badmfck-api-server 2.8.9 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -236,7 +236,7 @@ class MysqlAdapter {
|
|
236
236
|
}
|
237
237
|
}
|
238
238
|
catch (e) {
|
239
|
-
(0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${e
|
239
|
+
(0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${query}`, e);
|
240
240
|
const error = {
|
241
241
|
code: "EXEC_ERROR",
|
242
242
|
errno: 100002,
|
@@ -341,7 +341,9 @@ class MysqlAdapter {
|
|
341
341
|
if (value === null || value === undefined)
|
342
342
|
return "NULL";
|
343
343
|
if (!system && typeof value === "string")
|
344
|
-
value = value.replaceAll('"', '\\"');
|
344
|
+
value = '"' + value.replaceAll('"', '\\"') + '"';
|
345
|
+
if (typeof value === "boolean")
|
346
|
+
value = value ? 1 : 0;
|
345
347
|
field.__parsedValue = value;
|
346
348
|
return value;
|
347
349
|
}
|