badmfck-api-server 1.1.9 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,6 @@ class MysqlService extends BaseService_1.BaseService {
|
|
20
20
|
constructor(options) {
|
21
21
|
super("mysql");
|
22
22
|
this.options = options;
|
23
|
-
this.init();
|
24
23
|
}
|
25
24
|
static async executeQuery(query) { return await exports.REQ_MYSQL_QUERY.request(query); }
|
26
25
|
async init() {
|
@@ -103,11 +102,12 @@ class MysqlService extends BaseService_1.BaseService {
|
|
103
102
|
return query;
|
104
103
|
}
|
105
104
|
static prepareQueryFieldValue(value, system) {
|
106
|
-
if (value === null)
|
107
|
-
return "NULL";
|
108
105
|
if (!system && typeof value === "string") {
|
109
106
|
value = value ? value.replaceAll('"', '\\"') : null;
|
110
|
-
|
107
|
+
if (value !== null)
|
108
|
+
value = '"' + value + '"';
|
109
|
+
else
|
110
|
+
value = "NULL";
|
111
111
|
}
|
112
112
|
return value;
|
113
113
|
}
|