This commit is contained in:
SPRINX0\prochazka
2025-04-28 14:19:48 +02:00
parent 857d0f3316
commit e41727a1fc
2 changed files with 2 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ class Analyser extends DatabaseAnalyser {
const foreignKeysResult = await this.analyserQuery('foreignKeys', ['tables']);
const primaryKeysResult = await this.analyserQuery('primaryKeys', ['tables']);
const uniquesResults = await this.analyserQuery('uniques', ['tables']);
const indexesResult = await this.analyserQuery('uniques', ['indexes']);
const indexesResult = await this.analyserQuery('indexes', ['tables']);
const viewsResult = await this.analyserQuery('views', ['views']);
/**

View File

@@ -56,6 +56,7 @@ function clean(segment) {
}
function extractIndexColumns(sql) {
if (!sql) return [];
const sqlText = sql // your variable
.replace(/\s+/g, ' ') // collapse whitespace
.replace(/--.*?$/gm, '') // strip line comments