diff --git a/integration-tests/engines.js b/integration-tests/engines.js index a21194847..5773918b3 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -118,7 +118,7 @@ const engines = [ engine: 'sqlite@dbgate-plugin-sqlite', }, objects: [views], - skipOnCI: true, + skipOnCI: false, }, { label: 'CockroachDB', diff --git a/plugins/dbgate-plugin-sqlite/src/backend/Analyser.js b/plugins/dbgate-plugin-sqlite/src/backend/Analyser.js index d699b497f..e61bea08e 100644 --- a/plugins/dbgate-plugin-sqlite/src/backend/Analyser.js +++ b/plugins/dbgate-plugin-sqlite/src/backend/Analyser.js @@ -16,8 +16,8 @@ SELECT `; class Analyser extends DatabaseAnalyser { - constructor(pool, driver, version) { - super(pool, driver, version); + constructor(dbhan, driver, version) { + super(dbhan, driver, version); } async _computeSingleObjectId() { @@ -26,8 +26,8 @@ class Analyser extends DatabaseAnalyser { } async _getFastSnapshot() { - const objects = await this.driver.query(this.pool, "select * from sqlite_master where type='table' or type='view'"); - const indexcols = await this.driver.query(this.pool, indexcolsQuery); + const objects = await this.driver.query(this.dbhan, "select * from sqlite_master where type='table' or type='view'"); + const indexcols = await this.driver.query(this.dbhan, indexcolsQuery); return { tables: objects.rows @@ -79,7 +79,7 @@ class Analyser extends DatabaseAnalyser { createSql: x.sql, })); - const indexcols = await this.driver.query(this.pool, indexcolsQuery); + const indexcols = await this.driver.query(this.dbhan, indexcolsQuery); for (const tableName of this.getRequestedObjectPureNames( 'tables', @@ -88,7 +88,7 @@ class Analyser extends DatabaseAnalyser { const tableObj = tableList.find((x) => x.pureName == tableName); if (!tableObj) continue; - const info = await this.driver.query(this.pool, `pragma table_info('${tableName}')`); + const info = await this.driver.query(this.dbhan, `pragma table_info('${tableName}')`); tableObj.columns = info.rows.map((col) => ({ columnName: col.name, dataType: col.type, @@ -132,7 +132,7 @@ class Analyser extends DatabaseAnalyser { }; } - const fklist = await this.driver.query(this.pool, `pragma foreign_key_list('${tableName}')`); + const fklist = await this.driver.query(this.dbhan, `pragma foreign_key_list('${tableName}')`); tableObj.foreignKeys = _.values(_.groupBy(fklist.rows, 'id')).map((fkcols) => { const fkcol = fkcols[0]; const fk = { @@ -157,7 +157,7 @@ class Analyser extends DatabaseAnalyser { const viewObj = viewList.find((x) => x.pureName == viewName); if (!viewObj) continue; - const info = await this.driver.query(this.pool, `pragma table_info('${viewName}')`); + const info = await this.driver.query(this.dbhan, `pragma table_info('${viewName}')`); viewObj.columns = info.rows.map((col) => ({ columnName: col.name, dataType: col.type,