badmfck-api-server 2.8.1 → 2.8.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -155,6 +155,12 @@ class MysqlAdapter {
|
|
155
155
|
}
|
156
156
|
async query(request) {
|
157
157
|
const query = this.prepareQuery(request);
|
158
|
+
if (request.parseQueryOnly) {
|
159
|
+
return {
|
160
|
+
data: [{ query }],
|
161
|
+
error: null,
|
162
|
+
};
|
163
|
+
}
|
158
164
|
if (!this.pool) {
|
159
165
|
(0, LogService_1.logError)("${MysqlAdapter.js}", "No pool created, can't execute query");
|
160
166
|
const error = {
|
@@ -263,7 +269,7 @@ class MysqlAdapter {
|
|
263
269
|
for (let i in fields) {
|
264
270
|
const name = i;
|
265
271
|
const value = fields[i];
|
266
|
-
if (typeof value === "string")
|
272
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
|
267
273
|
fields[i] = { value: value, system: false };
|
268
274
|
if (value === undefined)
|
269
275
|
continue;
|