From 6dbbbc670485251fb0a6226dcd12db8e914fc6c1 Mon Sep 17 00:00:00 2001 From: Muhammad Aaqil Date: Sun, 3 Mar 2024 21:30:03 +0500 Subject: [PATCH] feat: add query execution for mode discovery Signed-off-by: Muhammad Aaqil --- lib/sql.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/sql.js b/lib/sql.js index 4f07a6bc..e62423da 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -2105,3 +2105,20 @@ SQLConnector.prototype.setNullableProperty = function(property) { throw new Error(g.f('{{setNullableProperty}} must be implemented by' + 'the connector')); }; + +/** + * Discover if database is in strict mode + * @param {Function} [cb] The callback function + */ +SQLConnector.prototype.discoverIsStrict = function(cb) { + const self = this; + const sql = self.buildQueryIsStrict(); + this.execute(sql, cb); +}; + +/** + * Build sql for checking if database is in strict mode + */ +SQLConnector.prototype.buildQueryIsStrict = function() { + throw new Error(g.f('{{isStrict}} must be implemented by the connector')); +};