feat: add query execution for mode discovery
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
This commit is contained in:
parent
012c2def3a
commit
6dbbbc6704
17
lib/sql.js
17
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'));
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue