From c41d6bfdd0c34a2fcb7cfb1e117ccbedda6a87d4 Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Thu, 17 Oct 2024 08:47:01 -0300 Subject: [PATCH] new(core.gbapp): LLM alerts for data. --- src/util.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/util.ts b/src/util.ts index 07226600..c6ddf3a6 100644 --- a/src/util.ts +++ b/src/util.ts @@ -212,21 +212,13 @@ export class GBUtil { public static async listTables(dialect: any, seq: any) { let tables; if (dialect === 'mssql') { - tables = await seq.query( - `SELECT table_name, table_schema - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' - ORDER BY table_name ASC`, - { - type: QueryTypes.RAW - } - )[0]; - } else { + tables = await seq.getQueryInterface().showAllTables({ schema: 'dbo' }); + } else { tables = await seq.getQueryInterface().showAllTables(); } return tables; } - + // Check if is a tree or flat object.