new(core.gbapp): LLM alerts for data.
This commit is contained in:
parent
7df5ab0244
commit
c41d6bfdd0
1 changed files with 3 additions and 11 deletions
14
src/util.ts
14
src/util.ts
|
@ -212,21 +212,13 @@ export class GBUtil {
|
||||||
public static async listTables(dialect: any, seq: any) {
|
public static async listTables(dialect: any, seq: any) {
|
||||||
let tables;
|
let tables;
|
||||||
if (dialect === 'mssql') {
|
if (dialect === 'mssql') {
|
||||||
tables = await seq.query(
|
tables = await seq.getQueryInterface().showAllTables({ schema: 'dbo' });
|
||||||
`SELECT table_name, table_schema
|
} else {
|
||||||
FROM information_schema.tables
|
|
||||||
WHERE table_type = 'BASE TABLE'
|
|
||||||
ORDER BY table_name ASC`,
|
|
||||||
{
|
|
||||||
type: QueryTypes.RAW
|
|
||||||
}
|
|
||||||
)[0];
|
|
||||||
} else {
|
|
||||||
tables = await seq.getQueryInterface().showAllTables();
|
tables = await seq.getQueryInterface().showAllTables();
|
||||||
}
|
}
|
||||||
return tables;
|
return tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check if is a tree or flat object.
|
// Check if is a tree or flat object.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue