Skip to content

Commit b9b12a3

Browse files
committed
feat: add query builder to determine strict mode
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
1 parent 858adf3 commit b9b12a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/discovery.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,15 @@ function mixinDiscovery(MySQL, mysql) {
298298
return sql;
299299
};
300300

301+
302+
/**
303+
* Build query to determine is strict mode
304+
*/
305+
306+
MySQL.prototype.buildQueryIsStrict = function() {
307+
return "SELECT @@SESSION.sql_mode LIKE '%STRICT%' AS strictMode;";
308+
};
309+
301310
/**
302311
* Discover foreign keys that reference to the primary key of this table
303312
* @param {String} table The table name
@@ -414,4 +423,5 @@ function mixinDiscovery(MySQL, mysql) {
414423
MySQL.prototype.setNullableProperty = function(r) {
415424
r.nullable = r.nullable ? 'Y' : 'N';
416425
};
426+
417427
}

0 commit comments

Comments
 (0)