From 4862c7d18410458083cc74894cb61776bd13f2e7 Mon Sep 17 00:00:00 2001 From: adrianNEMO <43702457+adrianNEMO@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:59:01 +0100 Subject: [PATCH] feat: add db connection event types --- providers/database_provider.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/providers/database_provider.ts b/providers/database_provider.ts index cf003399..13749998 100644 --- a/providers/database_provider.ts +++ b/providers/database_provider.ts @@ -14,7 +14,7 @@ import { Adapter } from '../src/orm/adapter/index.js' import { QueryClient } from '../src/query_client/index.js' import { BaseModel } from '../src/orm/base_model/index.js' import { DatabaseTestUtils } from '../src/test_utils/database.js' -import type { DatabaseConfig, DbQueryEventNode } from '../src/types/database.js' +import type { ConnectionContract, DatabaseConfig, DbQueryEventNode } from '../src/types/database.js' import { VineDbSearchCallback, VineDbSearchOptions } from '../src/types/vine.js' /** @@ -26,6 +26,9 @@ declare module '@adonisjs/core/types' { } export interface EventsList { 'db:query': DbQueryEventNode + 'db:connection:connect': ConnectionContract + 'db:connection:disconnect': ConnectionContract + 'db:connection:error': [Error, ConnectionContract] } }