feat: add query execution for mode discovery

Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
This commit is contained in:
Muhammad Aaqil 2024-03-03 21:30:03 +05:00
parent 012c2def3a
commit 6dbbbc6704
1 changed files with 17 additions and 0 deletions

View File

@ -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'));
};