mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 13:53:59 +00:00
fix
This commit is contained in:
@@ -31,7 +31,7 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
const foreignKeysResult = await this.analyserQuery('foreignKeys', ['tables']);
|
const foreignKeysResult = await this.analyserQuery('foreignKeys', ['tables']);
|
||||||
const primaryKeysResult = await this.analyserQuery('primaryKeys', ['tables']);
|
const primaryKeysResult = await this.analyserQuery('primaryKeys', ['tables']);
|
||||||
const uniquesResults = await this.analyserQuery('uniques', ['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']);
|
const viewsResult = await this.analyserQuery('views', ['views']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ function clean(segment) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractIndexColumns(sql) {
|
function extractIndexColumns(sql) {
|
||||||
|
if (!sql) return [];
|
||||||
const sqlText = sql // your variable
|
const sqlText = sql // your variable
|
||||||
.replace(/\s+/g, ' ') // collapse whitespace
|
.replace(/\s+/g, ' ') // collapse whitespace
|
||||||
.replace(/--.*?$/gm, '') // strip line comments
|
.replace(/--.*?$/gm, '') // strip line comments
|
||||||
|
|||||||
Reference in New Issue
Block a user