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 b9b12a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,15 @@ function mixinDiscovery(MySQL, mysql) {
return sql;
};


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

Check failure on line 304 in lib/discovery.js

View workflow job for this annotation

GitHub Actions / Code Lint

More than 1 blank line not allowed

Check failure on line 304 in lib/discovery.js

View workflow job for this annotation

GitHub Actions / build (18)

More than 1 blank line not allowed

Check failure on line 304 in lib/discovery.js

View workflow job for this annotation

GitHub Actions / build (20)

More than 1 blank line not allowed

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 Expand Up @@ -414,4 +423,5 @@ function mixinDiscovery(MySQL, mysql) {
MySQL.prototype.setNullableProperty = function(r) {
r.nullable = r.nullable ? 'Y' : 'N';
};

}

0 comments on commit b9b12a3

Please sign in to comment.