@geekbears/gb-mongoose-query-parser 1.3.16 → 1.3.17
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.
- package/lib/query-parser-helper.d.ts +6 -0
- package/lib/query-parser-helper.js +101 -199
- package/lib/query-parser.js +92 -106
- package/lib/test.spec.js +226 -177
- package/package.json +1 -1
|
@@ -112,4 +112,10 @@ export declare class QueryParser {
|
|
|
112
112
|
* @returns the result of executing the provided query on the provided model
|
|
113
113
|
*/
|
|
114
114
|
static docById<T = any>(model: Model<T>, _id: string, query: ParsedQs): Promise<IDocByQueryRes<T>>;
|
|
115
|
+
/**
|
|
116
|
+
* Transforms the filter param to correctly support `ObjectId`s
|
|
117
|
+
* @param filter the filter param
|
|
118
|
+
* @returns a casted filter
|
|
119
|
+
*/
|
|
120
|
+
static transformFilter<T = any>(filter: T): T;
|
|
115
121
|
}
|
|
@@ -1,64 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
3
|
exports.QueryParser = void 0;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const query_parser_1 = require("./query-parser");
|
|
7
|
+
const class_validator_1 = require("class-validator");
|
|
55
8
|
/**
|
|
56
9
|
* Helper class
|
|
57
10
|
* Implements the `MongooseQueryParser` and exposes a single method to execute queries on models
|
|
58
11
|
*/
|
|
59
|
-
|
|
60
|
-
function QueryParser() {
|
|
61
|
-
}
|
|
12
|
+
class QueryParser {
|
|
62
13
|
/**
|
|
63
14
|
* Build a Mongoose query on a given model from the parsed query string
|
|
64
15
|
* @param model a mongoose `Model` object to perform the query on
|
|
@@ -66,16 +17,15 @@ var QueryParser = /** @class */ (function () {
|
|
|
66
17
|
* @param count an optional flag that indicates wether a `count` operation should be performed
|
|
67
18
|
* @returns a Mongoose query on the provided model
|
|
68
19
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var countQueryDocuments;
|
|
20
|
+
static parseQuery(model, query, count = false) {
|
|
21
|
+
let docsQuery;
|
|
22
|
+
let countQueryDocuments;
|
|
73
23
|
docsQuery = model.find({});
|
|
74
24
|
countQueryDocuments = count ? model.countDocuments() : null;
|
|
75
25
|
if (!(0, lodash_1.isEmpty)(query)) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
(0, lodash_1.forOwn)(transformFilter(queryParams.filter),
|
|
26
|
+
const parser = new query_parser_1.MongooseQueryParser();
|
|
27
|
+
const queryParams = parser.parse(query);
|
|
28
|
+
(0, lodash_1.forOwn)(this.transformFilter(queryParams.filter), (value, key) => {
|
|
79
29
|
if ((0, class_validator_1.isMongoId)(value))
|
|
80
30
|
value = mongoose_1.Types.ObjectId.createFromHexString(value.toString());
|
|
81
31
|
docsQuery = docsQuery.where(key, value);
|
|
@@ -96,7 +46,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
96
46
|
docsQuery = docsQuery.skip(queryParams.skip);
|
|
97
47
|
}
|
|
98
48
|
return count && countQueryDocuments ? countQueryDocuments : docsQuery;
|
|
99
|
-
}
|
|
49
|
+
}
|
|
100
50
|
/**
|
|
101
51
|
* Get all documents matching the provided query for a given model
|
|
102
52
|
* @deprecated The method should not be used, please use ```docsByQuery```
|
|
@@ -105,26 +55,14 @@ var QueryParser = /** @class */ (function () {
|
|
|
105
55
|
* @param count an optional flag that indicates wether a `count` operation should be performed
|
|
106
56
|
* @returns the result of executing the provided query on the provided model
|
|
107
57
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_b.trys.push([0, 2, , 3]);
|
|
117
|
-
_a = {};
|
|
118
|
-
return [4 /*yield*/, QueryParser.parseQuery(model, query, count).exec()];
|
|
119
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(), _a)];
|
|
120
|
-
case 2:
|
|
121
|
-
error_1 = _b.sent();
|
|
122
|
-
throw new Error(error_1);
|
|
123
|
-
case 3: return [2 /*return*/];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
};
|
|
58
|
+
static async docByQuery(model, query, count = false) {
|
|
59
|
+
try {
|
|
60
|
+
return { data: await QueryParser.parseQuery(model, query, count).exec() };
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
throw new Error(error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
128
66
|
/**
|
|
129
67
|
* Get all documents matching the provided query for a given model
|
|
130
68
|
* @param model a mongoose `Model` object to perform the query on
|
|
@@ -132,26 +70,14 @@ var QueryParser = /** @class */ (function () {
|
|
|
132
70
|
* @param count an optional flag that indicates wether a `count` operation should be performed
|
|
133
71
|
* @returns the result of executing the provided query on the provided model
|
|
134
72
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
_b.trys.push([0, 2, , 3]);
|
|
144
|
-
_a = {};
|
|
145
|
-
return [4 /*yield*/, QueryParser.parseQuery(model, query, count).exec()];
|
|
146
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(), _a)];
|
|
147
|
-
case 2:
|
|
148
|
-
error_2 = _b.sent();
|
|
149
|
-
throw new Error(error_2);
|
|
150
|
-
case 3: return [2 /*return*/];
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
};
|
|
73
|
+
static async docsByQuery(model, query, count = false) {
|
|
74
|
+
try {
|
|
75
|
+
return { data: await QueryParser.parseQuery(model, query, count).exec() };
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
throw new Error(error);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
155
81
|
/**
|
|
156
82
|
* Get all documents matching the provided query for a given model to a mongodb cursor resource
|
|
157
83
|
* @deprecated The method should not be used, please use ```docsByQueryToCursor```
|
|
@@ -160,7 +86,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
160
86
|
* @param count an optional flag that indicates wether a `count` operation should be performed
|
|
161
87
|
* @returns the cursor of executing the provided query on the provided model
|
|
162
88
|
*/
|
|
163
|
-
|
|
89
|
+
static docByQueryToCursor(model, query) {
|
|
164
90
|
try {
|
|
165
91
|
return {
|
|
166
92
|
data: QueryParser.parseQuery(model, query, false).cursor(),
|
|
@@ -169,7 +95,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
169
95
|
catch (error) {
|
|
170
96
|
throw new Error(error);
|
|
171
97
|
}
|
|
172
|
-
}
|
|
98
|
+
}
|
|
173
99
|
/**
|
|
174
100
|
* Get all documents matching the provided query for a given model to a mongodb cursor resource
|
|
175
101
|
* @param model a mongoose `Model` object to perform the query on
|
|
@@ -177,7 +103,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
177
103
|
* @param count an optional flag that indicates wether a `count` operation should be performed
|
|
178
104
|
* @returns the cursor of executing the provided query on the provided model
|
|
179
105
|
*/
|
|
180
|
-
|
|
106
|
+
static docsByQueryToCursor(model, query) {
|
|
181
107
|
try {
|
|
182
108
|
return {
|
|
183
109
|
data: QueryParser.parseQuery(model, query, false).cursor(),
|
|
@@ -186,7 +112,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
186
112
|
catch (error) {
|
|
187
113
|
throw new Error(error);
|
|
188
114
|
}
|
|
189
|
-
}
|
|
115
|
+
}
|
|
190
116
|
/**
|
|
191
117
|
* Build a Mongoose `findOne` or `find` query on a given model with additional params
|
|
192
118
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -195,14 +121,14 @@ var QueryParser = /** @class */ (function () {
|
|
|
195
121
|
* @param query a query string object received by the controller
|
|
196
122
|
* @returns a Mongoose query on the provided model
|
|
197
123
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
docQuery = singleMode ? model.findOne(
|
|
124
|
+
static parseFromCustomFilterToQuery(model, singleMode, filter, query) {
|
|
125
|
+
let docQuery;
|
|
126
|
+
docQuery = singleMode ? model.findOne({ ...filter }) : model.find({ ...filter });
|
|
201
127
|
if (!(0, lodash_1.isEmpty)(query)) {
|
|
202
|
-
|
|
128
|
+
const parser = new query_parser_1.MongooseQueryParser({
|
|
203
129
|
blacklist: ['filter', 'sort', 'limit', 'skip'],
|
|
204
130
|
});
|
|
205
|
-
|
|
131
|
+
const queryParams = parser.parse(query);
|
|
206
132
|
if (queryParams.populate)
|
|
207
133
|
docQuery = docQuery.populate(queryParams.populate);
|
|
208
134
|
if (queryParams.deepPopulate)
|
|
@@ -211,7 +137,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
211
137
|
docQuery = docQuery.select(queryParams.select);
|
|
212
138
|
}
|
|
213
139
|
return docQuery;
|
|
214
|
-
}
|
|
140
|
+
}
|
|
215
141
|
/**
|
|
216
142
|
* Build a Mongoose `findOne` query on a given model with additional params
|
|
217
143
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -219,14 +145,14 @@ var QueryParser = /** @class */ (function () {
|
|
|
219
145
|
* @param query a query string object received by the controller
|
|
220
146
|
* @returns a Mongoose query on the provided model
|
|
221
147
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
docQuery = model.findOne(
|
|
148
|
+
static parseFilterQuery(model, filter, query) {
|
|
149
|
+
let docQuery;
|
|
150
|
+
docQuery = model.findOne({ ...filter });
|
|
225
151
|
if (!(0, lodash_1.isEmpty)(query)) {
|
|
226
|
-
|
|
152
|
+
const parser = new query_parser_1.MongooseQueryParser({
|
|
227
153
|
blacklist: ['filter', 'sort', 'limit', 'skip'],
|
|
228
154
|
});
|
|
229
|
-
|
|
155
|
+
const queryParams = parser.parse(query);
|
|
230
156
|
if (queryParams.populate)
|
|
231
157
|
docQuery = docQuery.populate(queryParams.populate);
|
|
232
158
|
if (queryParams.deepPopulate)
|
|
@@ -235,7 +161,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
235
161
|
docQuery = docQuery.select(queryParams.select);
|
|
236
162
|
}
|
|
237
163
|
return docQuery;
|
|
238
|
-
}
|
|
164
|
+
}
|
|
239
165
|
/**
|
|
240
166
|
* Get a document matching the provided query for a given model
|
|
241
167
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -243,26 +169,16 @@ var QueryParser = /** @class */ (function () {
|
|
|
243
169
|
* @param query a query string object received by the controller
|
|
244
170
|
* @returns the result of executing the provided query on the provided model
|
|
245
171
|
*/
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
257
|
-
_a)];
|
|
258
|
-
case 2:
|
|
259
|
-
error_3 = _b.sent();
|
|
260
|
-
throw new Error(error_3);
|
|
261
|
-
case 3: return [2 /*return*/];
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
});
|
|
265
|
-
};
|
|
172
|
+
static async docByFilter(model, filter, query) {
|
|
173
|
+
try {
|
|
174
|
+
return {
|
|
175
|
+
data: await QueryParser.parseFilterQuery(model, filter, query).exec(),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
throw new Error(error);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
266
182
|
/**
|
|
267
183
|
* Get a document matching the provided query for a given model
|
|
268
184
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -271,7 +187,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
271
187
|
* @param query a query string object received by the controller
|
|
272
188
|
* @returns the result of executing the provided query on the provided model
|
|
273
189
|
*/
|
|
274
|
-
|
|
190
|
+
static docsFromCustomFilterToCursor(model, singleMode, filter, query) {
|
|
275
191
|
try {
|
|
276
192
|
return {
|
|
277
193
|
data: QueryParser.parseFromCustomFilterToQuery(model, singleMode, filter, query).cursor(),
|
|
@@ -280,7 +196,7 @@ var QueryParser = /** @class */ (function () {
|
|
|
280
196
|
catch (error) {
|
|
281
197
|
throw new Error(error);
|
|
282
198
|
}
|
|
283
|
-
}
|
|
199
|
+
}
|
|
284
200
|
/**
|
|
285
201
|
* Get a document matching the provided query for a given model
|
|
286
202
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -289,26 +205,16 @@ var QueryParser = /** @class */ (function () {
|
|
|
289
205
|
* @param query a query string object received by the controller
|
|
290
206
|
* @returns the result of executing the provided query on the provided model
|
|
291
207
|
*/
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
case 1: return [2 /*return*/, (_a.data = _b.sent(),
|
|
303
|
-
_a)];
|
|
304
|
-
case 2:
|
|
305
|
-
error_4 = _b.sent();
|
|
306
|
-
throw new Error(error_4);
|
|
307
|
-
case 3: return [2 /*return*/];
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
};
|
|
208
|
+
static async docsByFilter(model, singleMode, filter, query) {
|
|
209
|
+
try {
|
|
210
|
+
return {
|
|
211
|
+
data: await QueryParser.parseFromCustomFilterToQuery(model, singleMode, filter, query).exec(),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
throw new Error(error);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
312
218
|
/**
|
|
313
219
|
* Build a Mongoose `findOneById` query on a given model with additional params
|
|
314
220
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -316,9 +222,9 @@ var QueryParser = /** @class */ (function () {
|
|
|
316
222
|
* @param query a query string object received by the controller
|
|
317
223
|
* @returns a Mongoose query on the provided model
|
|
318
224
|
*/
|
|
319
|
-
|
|
320
|
-
return QueryParser.parseFilterQuery(model, { _id
|
|
321
|
-
}
|
|
225
|
+
static parseByIdQuery(model, _id, query) {
|
|
226
|
+
return QueryParser.parseFilterQuery(model, { _id }, query);
|
|
227
|
+
}
|
|
322
228
|
/**
|
|
323
229
|
* Get a document matching the provided query for a given model
|
|
324
230
|
* @param model a Mongoose `Model` object to perform the query on
|
|
@@ -326,46 +232,42 @@ var QueryParser = /** @class */ (function () {
|
|
|
326
232
|
* @param query a query string object received by the controller
|
|
327
233
|
* @returns the result of executing the provided query on the provided model
|
|
328
234
|
*/
|
|
329
|
-
|
|
330
|
-
return QueryParser.docByFilter(model, { _id
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
235
|
+
static docById(model, _id, query) {
|
|
236
|
+
return QueryParser.docByFilter(model, { _id }, query);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Transforms the filter param to correctly support `ObjectId`s
|
|
240
|
+
* @param filter the filter param
|
|
241
|
+
* @returns a casted filter
|
|
242
|
+
*/
|
|
243
|
+
static transformFilter(filter) {
|
|
244
|
+
const walk = (obj) => {
|
|
245
|
+
for (const [i, [key, value]] of Object.entries(obj).entries()) {
|
|
246
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
247
|
+
const validId = (0, mongoose_1.isObjectIdOrHexString)(value);
|
|
248
|
+
if (validId && (0, class_validator_1.isMongoId)(value)) {
|
|
249
|
+
obj[key] = mongoose_1.Types.ObjectId.createFromHexString(value.toString());
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
if (i % 1000 === 0) {
|
|
253
|
+
setImmediate(() => {
|
|
254
|
+
walk(obj[key]);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
else
|
|
351
258
|
walk(obj[key]);
|
|
352
|
-
});
|
|
353
259
|
}
|
|
354
|
-
|
|
355
|
-
|
|
260
|
+
// if (typeof value === 'object') {
|
|
261
|
+
// console.log('walking......');
|
|
262
|
+
// walk(obj[key]);
|
|
263
|
+
// } else obj[key] = Types.ObjectId.isValid(value) ? new Types.ObjectId(value) : value;
|
|
356
264
|
}
|
|
357
|
-
// if (typeof value === 'object') {
|
|
358
|
-
// console.log('walking......');
|
|
359
|
-
// walk(obj[key]);
|
|
360
|
-
// } else obj[key] = Types.ObjectId.isValid(value) ? new Types.ObjectId(value) : value;
|
|
361
265
|
}
|
|
266
|
+
return obj;
|
|
362
267
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
return obj;
|
|
368
|
-
};
|
|
369
|
-
return walk(__assign({}, filter));
|
|
268
|
+
const res = walk({ ...filter });
|
|
269
|
+
return res;
|
|
270
|
+
}
|
|
370
271
|
}
|
|
272
|
+
exports.QueryParser = QueryParser;
|
|
371
273
|
//# sourceMappingURL=query-parser-helper.js.map
|