Skip to content

Commit ebd9490

Browse files
committed
feat: add query execution for mode discovery
Signed-off-by: Muhammad Aaqil <[email protected]>
1 parent 012c2de commit ebd9490

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: lib/sql.js

+17
Original file line numberDiff line numberDiff line change
@@ -2105,3 +2105,20 @@ SQLConnector.prototype.setNullableProperty = function(property) {
21052105
throw new Error(g.f('{{setNullableProperty}} must be implemented by' +
21062106
'the connector'));
21072107
};
2108+
2109+
/**
2110+
* Discover if database is in strict mode
2111+
* @param {Function} [cb] The callback function
2112+
*/
2113+
SQLConnector.prototype.discoverIsStrict = function(cb) {
2114+
const self = this;
2115+
const sql = self.buildQueryIsStrict();
2116+
this.execute(sql, cb);
2117+
}
2118+
2119+
/**
2120+
* Build sql for checking if database is in strict mode
2121+
*/
2122+
SQLConnector.prototype.buildQueryIsStrict = function() {
2123+
throw new Error(g.f('{{isStrict}} must be implemented by the connector'));
2124+
};

0 commit comments

Comments
 (0)