You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`Language queried is invalid ${code}`);
231
233
}
232
234
this.q.locale=code;
233
235
returnthis;
234
236
}
235
237
/**
238
+
* @public
236
239
* @method and
237
-
* @description
238
-
* Logical AND query wrapper
239
-
*
240
+
* @summary Logical AND query wrapper
241
+
* @description Accepts 2 queries and returns only those documents, that satisfy both the query conditions
240
242
* @param {object} queries Query filter
241
243
* @example
242
244
* Stack
@@ -274,10 +276,10 @@ class Stack {
274
276
returnthis;
275
277
}
276
278
/**
279
+
* @public
277
280
* @method or
278
-
* @description
279
-
* Logical OR query wrapper
280
-
*
281
+
* @summary Logical OR query wrapper
282
+
* @description Accepts 2 queries and returns only those documents, that satisfy either of the query conditions
281
283
* @param {object} queries Query filter
282
284
* @example
283
285
* Stack
@@ -315,10 +317,12 @@ class Stack {
315
317
returnthis;
316
318
}
317
319
/**
320
+
* @public
318
321
* @method lessThan
322
+
* @summary Comparison $lt query wrapper
319
323
* @description
320
-
* Comparison $lt query wrapper
321
-
*
324
+
* Compares the field/key provided against the provided value. Only documents that have lower value than the one provided are returned.
325
+
* Check https://docs.mongodb.com/manual/reference/operator/query/lt/ and https://docs.mongodb.com/manual/reference/method/db.collection.find/#type-bracketing for more info
322
326
* @param {string} key Field to compare against
323
327
* @param {*} value Value to compare with
324
328
* @example
@@ -355,10 +359,12 @@ class Stack {
355
359
returnthis;
356
360
}
357
361
/**
362
+
* @public
358
363
* @method lessThanOrEqualTo
364
+
* @summary Comparison $lte query wrapper
359
365
* @description
360
-
* Comparison $lte query wrapper
361
-
*
366
+
* Compares the field/key provided against the provided value. Only documents that have lower or equal value than the one provided are returned.
367
+
* Check https://docs.mongodb.com/manual/reference/operator/query/lte/ and https://docs.mongodb.com/manual/reference/method/db.collection.find/#type-bracketing for more info
362
368
* @param {string} key Field to compare against
363
369
* @param {*} value Value to compare with
364
370
* @example
@@ -395,10 +401,12 @@ class Stack {
395
401
returnthis;
396
402
}
397
403
/**
398
-
* @member greaterThan
404
+
* @public
405
+
* @method greaterThan
406
+
* @summary Comparison $gt query wrapper
399
407
* @description
400
-
* Comparison $gt query wrapper
401
-
*
408
+
* Compares the field/key provided against the provided value. Only documents that have greater value than the one provided are returned.
409
+
* Check {@link https://docs.mongodb.com/manual/reference/operator/query/gt/ }and https://docs.mongodb.com/manual/reference/method/db.collection.find/#type-bracketing for more info
402
410
* @param {string} key Field to compare against
403
411
* @param {*} value Value to compare with
404
412
* @example
@@ -435,9 +443,12 @@ class Stack {
435
443
returnthis;
436
444
}
437
445
/**
446
+
* @public
438
447
* @method greaterThanOrEqualTo
448
+
* @summary Comparison $gte query wrapper
439
449
* @description
440
-
* Comparison $gte query wrapper
450
+
* Compares the field/key provided against the provided value. Only documents that have greater than or equal value than the one provided are returned.
451
+
* Check https://docs.mongodb.com/manual/reference/operator/query/gte/ and https://docs.mongodb.com/manual/reference/method/db.collection.find/#type-bracketing for more info
441
452
* @param {string} key - Field to compare against
442
453
* @param {*} value - Value to compare with
443
454
* @example
@@ -474,9 +485,17 @@ class Stack {
474
485
returnthis;
475
486
}
476
487
/**
488
+
* @public
477
489
* @method notEqualTo
490
+
* @summary Comparison $ne query wrapper
478
491
* @description
479
-
* Comparison $ne query wrapper
492
+
* Compares the field/key provided against the provided value. Only documents that have value not equals than the one provided are returned.
thrownewError('Kindly pass the content type\'s uid');
705
754
}
706
755
/**
756
+
* @public
707
757
* @method entry
708
-
* @description
709
-
* Query for a single entry
710
-
*
711
-
* @param {string} uid - Entry uid to be found, if not provided,
758
+
* @summary Query for a single entry
759
+
* @param {string} uid Entry uid to be found, if not provided,
712
760
* by default returns the 1st element in the content type.
713
761
* Useful for `singleton` content types
714
762
* @example
@@ -1067,7 +1115,9 @@ class Stack {
1067
1115
returnthis;
1068
1116
}
1069
1117
/**
1070
-
* Match entries that match a specific tags
1118
+
* @public
1119
+
* @method tags
1120
+
* @summary Match entries that match a specific tags
1071
1121
*
1072
1122
* @param {array} values Array of tag values
1073
1123
* @example
@@ -1108,17 +1158,16 @@ class Stack {
1108
1158
returnthis;
1109
1159
}
1110
1160
/**
1111
-
* @summary
1112
-
* Pass JS expression or a full function to the query system
1113
-
*
1161
+
* @method where
1162
+
* @summary Pass JS expression or a full function to the query system
1114
1163
* @description
1115
1164
* Use the $where operator to pass either a string containing a JavaScript expression or a full JavaScript function to the query system.
1116
1165
* The $where provides greater flexibility, but requires that the database processes the JavaScript expression or function for each document in the collection.
1117
1166
* Reference the document in the JavaScript expression or function using either this or obj.
1118
1167
* Only apply the $where query operator to top-level documents.
1119
1168
* The $where query operator will not work inside a nested document, for instance, in an $elemMatch query.
0 commit comments