Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add query execution for mode discovery #499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
};