Skip to content

Commit

Permalink
feat: add query builder to determine strict mode
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Aaqil <[email protected]>
  • Loading branch information
aaqilniz committed Mar 3, 2024
1 parent 858adf3 commit aa837f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ function mixinDiscovery(MySQL, mysql) {
return sql;
};

/**
* Build query to determine is strict mode
*/

MySQL.prototype.buildQueryIsStrict = function() {
return "SELECT @@SESSION.sql_mode LIKE '%STRICT%' AS strictMode;";
};

/**
* Discover foreign keys that reference to the primary key of this table
* @param {String} table The table name
Expand Down

0 comments on commit aa837f6

Please sign in to comment.