From 23940aa3240809482eafd97959de6c20269a13a7 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 6 May 2021 15:27:25 +0200 Subject: [PATCH] sqlite version --- plugins/dbgate-plugin-sqlite/src/backend/driver.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/dbgate-plugin-sqlite/src/backend/driver.js b/plugins/dbgate-plugin-sqlite/src/backend/driver.js index f1799ac7..5fbfebf0 100644 --- a/plugins/dbgate-plugin-sqlite/src/backend/driver.js +++ b/plugins/dbgate-plugin-sqlite/src/backend/driver.js @@ -142,7 +142,13 @@ const driver = { return createBulkInsertStreamBase(this, stream, pool, name, options); }, async getVersion(pool) { - return { version: 'SQLite 3' }; + const { rows } = await this.query(pool, 'select sqlite_version() as version'); + const { version } = rows[0]; + + return { + version, + versionText: `SQLite ${version}`, + }; }, };