From 06ae13ba4fbc4ac4805c5ad5b1db815831891900 Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Thu, 17 Oct 2024 10:35:48 -0300 Subject: [PATCH] new(core.gbapp): LLM alerts for data. --- src/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util.ts b/src/util.ts index c6ddf3a6..b8e30ef0 100644 --- a/src/util.ts +++ b/src/util.ts @@ -212,13 +212,15 @@ export class GBUtil { public static async listTables(dialect: any, seq: any) { let tables; if (dialect === 'mssql') { - tables = await seq.getQueryInterface().showAllTables({ schema: 'dbo' }); + // Extracting table name from the object returned by MSSQL + tables = await seq.getQueryInterface().showAllTables({ schema: 'dbo' }); + tables = tables.map((table: any) => table.tableName); // Extracting the table name } else { tables = await seq.getQueryInterface().showAllTables(); } return tables; } - + // Check if is a tree or flat object.