badmfck-api-server 1.9.9 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ export declare class MysqlService extends BaseService {
|
|
56
56
|
init(): Promise<void>;
|
57
57
|
recreatePool(): Promise<void>;
|
58
58
|
onApplicationReady(): Promise<void>;
|
59
|
-
static fieldsToObject(fields: MysqlQueryField[] | MysqlQueryFieldObject): MysqlQueryFieldObject;
|
59
|
+
static fieldsToObject(fields: MysqlQueryField[] | MysqlQueryFieldObject, ignoreSystemParameters?: boolean): MysqlQueryFieldObject;
|
60
60
|
static objectToFields(obj: MysqlQueryFieldObject | MysqlQueryField[]): MysqlQueryField[];
|
61
61
|
static prepareQuery(query: string, fields: MysqlQueryField[] | MysqlQueryFieldObject): string;
|
62
62
|
static prepareQueryFieldValue(value: string | number | boolean | null | undefined, system?: boolean): string | number | boolean | null | undefined;
|
@@ -88,7 +88,7 @@ class MysqlService extends BaseService_1.BaseService {
|
|
88
88
|
}
|
89
89
|
}
|
90
90
|
async onApplicationReady() { }
|
91
|
-
static fieldsToObject(fields) {
|
91
|
+
static fieldsToObject(fields, ignoreSystemParameters) {
|
92
92
|
if (!Array.isArray(fields))
|
93
93
|
return fields;
|
94
94
|
const obj = {};
|
@@ -98,13 +98,17 @@ class MysqlService extends BaseService_1.BaseService {
|
|
98
98
|
if (typeof i.value !== "object")
|
99
99
|
obj[i.name] = i.value;
|
100
100
|
else {
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
if (!ignoreSystemParameters) {
|
102
|
+
obj[i.name] = {
|
103
|
+
value: i.value,
|
104
|
+
system: i.system,
|
105
|
+
ignoreInInsert: i.ignoreInInsert,
|
106
|
+
ignoreInUpdate: i.ignoreInUpdate,
|
107
|
+
useInReplace: i.useInReplace
|
108
|
+
};
|
109
|
+
}
|
110
|
+
else
|
111
|
+
obj[i.name] = i.value;
|
108
112
|
}
|
109
113
|
}
|
110
114
|
return obj;
|