Skip to content

Commit aa837f6

Browse files
committed
feat: add query builder to determine strict mode
Signed-off-by: Muhammad Aaqil <[email protected]>
1 parent 858adf3 commit aa837f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/discovery.js

+8
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,14 @@ function mixinDiscovery(MySQL, mysql) {
298298
return sql;
299299
};
300300

301+
/**
302+
* Build query to determine is strict mode
303+
*/
304+
305+
MySQL.prototype.buildQueryIsStrict = function() {
306+
return "SELECT @@SESSION.sql_mode LIKE '%STRICT%' AS strictMode;";
307+
};
308+
301309
/**
302310
* Discover foreign keys that reference to the primary key of this table
303311
* @param {String} table The table name

0 commit comments

Comments
 (0)