From a9038984d861cd56531425671af9f2d2689d8f89 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 17 Mar 2022 13:48:54 +0100 Subject: [PATCH] mssql readonly (emulated, not supported natively) --- plugins/dbgate-plugin-mssql/src/frontend/driver.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/dbgate-plugin-mssql/src/frontend/driver.js b/plugins/dbgate-plugin-mssql/src/frontend/driver.js index 79df704b..dbcba6ac 100644 --- a/plugins/dbgate-plugin-mssql/src/frontend/driver.js +++ b/plugins/dbgate-plugin-mssql/src/frontend/driver.js @@ -47,6 +47,7 @@ const driver = { ...driverBase, dumperClass: MsSqlDumper, dialect, + readOnlySessions: false, dialectByVersion(version) { if (version && version.productVersionNumber < 11) { return { @@ -58,7 +59,9 @@ const driver = { return dialect; }, showConnectionField: (field, values) => - ['authType', 'server', 'port', 'user', 'password', 'defaultDatabase', 'singleDatabase'].includes(field), + ['authType', 'server', 'port', 'user', 'password', 'defaultDatabase', 'singleDatabase', 'isReadOnly'].includes( + field + ), getQuerySplitterOptions: () => mssqlSplitterOptions, engine: 'mssql@dbgate-plugin-mssql',