badmfck-api-server 3.7.1 → 3.7.3
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.
@@ -95,7 +95,7 @@ async function Initializer(services) {
|
|
95
95
|
exports.Initializer = Initializer;
|
96
96
|
class APIService extends BaseService_1.BaseService {
|
97
97
|
static nextLogID = 0;
|
98
|
-
version = "3.7.
|
98
|
+
version = "3.7.3";
|
99
99
|
options;
|
100
100
|
monitor = null;
|
101
101
|
started = new Date();
|
@@ -511,6 +511,10 @@ class MysqlAdapter {
|
|
511
511
|
queryField = { value: queryField, system: false };
|
512
512
|
if (queryField === null)
|
513
513
|
queryField = { value: null, system: true };
|
514
|
+
if (queryField.value === undefined) {
|
515
|
+
queryField.value = null;
|
516
|
+
queryField.system = true;
|
517
|
+
}
|
514
518
|
if (!queryField.name)
|
515
519
|
queryField.name = name.replaceAll("`", '').replaceAll('\"', "").replaceAll('\'', "");
|
516
520
|
fields[i] = queryField;
|
@@ -581,8 +585,10 @@ class MysqlAdapter {
|
|
581
585
|
static prepareQueryFieldValue(field) {
|
582
586
|
let value = field.value;
|
583
587
|
let system = field.system;
|
584
|
-
if (value === null || value === undefined)
|
588
|
+
if (value === null || value === undefined) {
|
589
|
+
field.__parsedValue = "NULL";
|
585
590
|
return "NULL";
|
591
|
+
}
|
586
592
|
if (!system && typeof value === "object") {
|
587
593
|
try {
|
588
594
|
value = JSON.stringify(value);
|
@@ -598,6 +604,10 @@ class MysqlAdapter {
|
|
598
604
|
if (typeof value === "boolean")
|
599
605
|
value = value ? 1 : 0;
|
600
606
|
field.__parsedValue = value;
|
607
|
+
if (field.__parsedValue === null || field.__parsedValue === undefined) {
|
608
|
+
field.__parsedValue = "NULL";
|
609
|
+
value = field.__parsedValue;
|
610
|
+
}
|
601
611
|
return value;
|
602
612
|
}
|
603
613
|
prepareCountQuery(query) {
|