From aa837f6ad6a32d1fab7df3dfa933b8dd3c4c9b8d Mon Sep 17 00:00:00 2001 From: Muhammad Aaqil Date: Sun, 3 Mar 2024 21:25:58 +0500 Subject: [PATCH] feat: add query builder to determine strict mode Signed-off-by: Muhammad Aaqil --- lib/discovery.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/discovery.js b/lib/discovery.js index a9cf6c2c..49844862 100644 --- a/lib/discovery.js +++ b/lib/discovery.js @@ -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