forked from parse-community/Parse-SDK-iOS-OSX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPFQuery.h
736 lines (527 loc) · 23.9 KB
/
PFQuery.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import <Bolts/BFTask.h>
#import <Parse/PFConstants.h>
#import <Parse/PFGeoPoint.h>
#import <Parse/PFObject.h>
#import <Parse/PFUser.h>
NS_ASSUME_NONNULL_BEGIN
/**
The `PFQuery` class defines a query that is used to query for `PFObject`s.
*/
@interface PFQuery<PFGenericObject : PFObject *> : NSObject<NSCopying>
///--------------------------------------
#pragma mark - Blocks
///--------------------------------------
typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *_Nullable objects, NSError * _Nullable error);
///--------------------------------------
#pragma mark - Creating a Query for a Class
///--------------------------------------
/**
Initializes the query with a class name.
@param className The class name.
*/
- (instancetype)initWithClassName:(NSString *)className;
/**
Returns a `PFQuery` for a given class.
@param className The class to query on.
@return A `PFQuery` object.
*/
+ (instancetype)queryWithClassName:(NSString *)className;
/**
Creates a PFQuery with the constraints given by predicate.
The following types of predicates are supported:
- Simple comparisons such as `=`, `!=`, `<`, `>`, `<=`, `>=`, and `BETWEEN` with a key and a constant.
- Containment predicates, such as `x IN {1, 2, 3}`.
- Key-existence predicates, such as `x IN SELF`.
- BEGINSWITH expressions.
- Compound predicates with `AND`, `OR`, and `NOT`.
- SubQueries with `key IN %@`, subquery.
The following types of predicates are NOT supported:
- Aggregate operations, such as `ANY`, `SOME`, `ALL`, or `NONE`.
- Regular expressions, such as `LIKE`, `MATCHES`, `CONTAINS`, or `ENDSWITH`.
- Predicates comparing one key to another.
- Complex predicates with many ORed clauses.
@param className The class to query on.
@param predicate The predicate to create conditions from.
*/
+ (instancetype)queryWithClassName:(NSString *)className predicate:(nullable NSPredicate *)predicate;
/**
The class name to query for.
*/
@property (nonatomic, strong) NSString *parseClassName;
///--------------------------------------
#pragma mark - Adding Basic Constraints
///--------------------------------------
/**
Make the query include `PFObject`s that have a reference stored at the provided key.
This has an effect similar to a join. You can use dot notation to specify which fields in
the included object are also fetch.
@param key The key to load child `PFObject`s for.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)includeKey:(NSString *)key;
/**
Make the query include `PFObject`s that have a reference stored at the provided keys.
@param keys The keys to load child `PFObject`s for.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)includeKeys:(NSArray<NSString *> *)keys;
/**
Make the query restrict the fields of the returned `PFObject`s to include only the provided keys.
If this is called multiple times, then all of the keys specified in each of the calls will be included.
@param keys The keys to include in the result.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)selectKeys:(NSArray<NSString *> *)keys;
/**
Add a constraint that requires a particular key exists.
@param key The key that should exist.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKeyExists:(NSString *)key;
/**
Add a constraint that requires a key not exist.
@param key The key that should not exist.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKeyDoesNotExist:(NSString *)key;
/**
Add a constraint to the query that requires a particular key's object to be equal to the provided object.
@param key The key to be constrained.
@param object The object that must be equalled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key equalTo:(id)object;
/**
Add a constraint to the query that requires a particular key's object to be less than the provided object.
@param key The key to be constrained.
@param object The object that provides an upper bound.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key lessThan:(id)object;
/**
Add a constraint to the query that requires a particular key's object
to be less than or equal to the provided object.
@param key The key to be constrained.
@param object The object that must be equalled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key lessThanOrEqualTo:(id)object;
/**
Add a constraint to the query that requires a particular key's object
to be greater than the provided object.
@param key The key to be constrained.
@param object The object that must be equalled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key greaterThan:(id)object;
/**
Add a constraint to the query that requires a particular key's
object to be greater than or equal to the provided object.
@param key The key to be constrained.
@param object The object that must be equalled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object;
/**
Add a constraint to the query that requires a particular key's object
to be not equal to the provided object.
@param key The key to be constrained.
@param object The object that must not be equalled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key notEqualTo:(id)object;
/**
Add a constraint to the query that requires a particular key's object
to be contained in the provided array.
@param key The key to be constrained.
@param array The possible values for the key's object.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key containedIn:(NSArray *)array;
/**
Add a constraint to the query that requires a particular key's object
not be contained in the provided array.
@param key The key to be constrained.
@param array The list of values the key's object should not be.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key notContainedIn:(NSArray *)array;
/**
Add a constraint to the query that requires a particular key's array
contains every element of the provided array.
@param key The key to be constrained.
@param array The array of values to search for.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key containsAllObjectsInArray:(NSArray *)array;
///--------------------------------------
#pragma mark - Adding Location Constraints
///--------------------------------------
/**
Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`)
be near a reference point.
Distance is calculated based on angular distance on a sphere. Results will be sorted by distance
from reference point.
@param key The key to be constrained.
@param geopoint The reference point represented as a `PFGeoPoint`.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint;
/**
Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`)
be near a reference point and within the maximum distance specified (in miles).
Distance is calculated based on a spherical coordinate system.
Results will be sorted by distance (nearest to farthest) from the reference point.
@param key The key to be constrained.
@param geopoint The reference point represented as a `PFGeoPoint`.
@param maxDistance Maximum distance in miles.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
nearGeoPoint:(PFGeoPoint *)geopoint
withinMiles:(double)maxDistance;
/**
Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`)
be near a reference point and within the maximum distance specified (in kilometers).
Distance is calculated based on a spherical coordinate system.
Results will be sorted by distance (nearest to farthest) from the reference point.
@param key The key to be constrained.
@param geopoint The reference point represented as a `PFGeoPoint`.
@param maxDistance Maximum distance in kilometers.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
nearGeoPoint:(PFGeoPoint *)geopoint
withinKilometers:(double)maxDistance;
/**
Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be near
a reference point and within the maximum distance specified (in radians). Distance is calculated based on
angular distance on a sphere. Results will be sorted by distance (nearest to farthest) from the reference point.
@param key The key to be constrained.
@param geopoint The reference point as a `PFGeoPoint`.
@param maxDistance Maximum distance in radians.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
nearGeoPoint:(PFGeoPoint *)geopoint
withinRadians:(double)maxDistance;
/**
Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be
contained within a given rectangular geographic bounding box.
@param key The key to be constrained.
@param southwest The lower-left inclusive corner of the box.
@param northeast The upper-right inclusive corner of the box.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)northeast;
///--------------------------------------
#pragma mark - Adding String Constraints
///--------------------------------------
/**
Add a regular expression constraint for finding string values that match the provided regular expression.
@warning This may be slow for large datasets.
@param key The key that the string to match is stored in.
@param regex The regular expression pattern to match.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key matchesRegex:(NSString *)regex;
/**
Add a regular expression constraint for finding string values that match the provided regular expression.
@warning This may be slow for large datasets.
@param key The key that the string to match is stored in.
@param regex The regular expression pattern to match.
@param modifiers Any of the following supported PCRE modifiers:
- `i` - Case insensitive search
- `m` - Search across multiple lines of input
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
matchesRegex:(NSString *)regex
modifiers:(nullable NSString *)modifiers;
/**
Add a constraint for finding string values that contain a provided substring.
@warning This will be slow for large datasets.
@param key The key that the string to match is stored in.
@param substring The substring that the value must contain.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key containsString:(nullable NSString *)substring;
/**
Add a constraint for finding string values that start with a provided prefix.
This will use smart indexing, so it will be fast for large datasets.
@param key The key that the string to match is stored in.
@param prefix The substring that the value must start with.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key hasPrefix:(nullable NSString *)prefix;
/**
Add a constraint for finding string values that end with a provided suffix.
@warning This will be slow for large datasets.
@param key The key that the string to match is stored in.
@param suffix The substring that the value must end with.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key hasSuffix:(nullable NSString *)suffix;
///--------------------------------------
#pragma mark - Adding Subqueries
///--------------------------------------
/**
Returns a `PFQuery` that is the `or` of the passed in queries.
@param queries The list of queries to or together.
@return An instance of `PFQuery` that is the `or` of the passed in queries.
*/
+ (instancetype)orQueryWithSubqueries:(NSArray<PFQuery *> *)queries;
/**
Adds a constraint that requires that a key's value matches a value in another key
in objects returned by a sub query.
@param key The key that the value is stored.
@param otherKey The key in objects in the returned by the sub query whose value should match.
@param query The query to run.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
matchesKey:(NSString *)otherKey
inQuery:(PFQuery *)query;
/**
Adds a constraint that requires that a key's value `NOT` match a value in another key
in objects returned by a sub query.
@param key The key that the value is stored.
@param otherKey The key in objects in the returned by the sub query whose value should match.
@param query The query to run.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key
doesNotMatchKey:(NSString *)otherKey
inQuery:(PFQuery *)query;
/**
Add a constraint that requires that a key's value matches a `PFQuery` constraint.
@warning This only works where the key's values are `PFObject`s or arrays of `PFObject`s.
@param key The key that the value is stored in
@param query The query the value should match
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key matchesQuery:(PFQuery *)query;
/**
Add a constraint that requires that a key's value to not match a `PFQuery` constraint.
@warning This only works where the key's values are `PFObject`s or arrays of `PFObject`s.
@param key The key that the value is stored in
@param query The query the value should not match
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)whereKey:(NSString *)key doesNotMatchQuery:(PFQuery *)query;
///--------------------------------------
#pragma mark - Sorting
///--------------------------------------
/**
Sort the results in *ascending* order with the given key.
@param key The key to order by.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)orderByAscending:(NSString *)key;
/**
Additionally sort in *ascending* order by the given key.
The previous keys provided will precedence over this key.
@param key The key to order by.
*/
- (instancetype)addAscendingOrder:(NSString *)key;
/**
Sort the results in *descending* order with the given key.
@param key The key to order by.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)orderByDescending:(NSString *)key;
/**
Additionally sort in *descending* order by the given key.
The previous keys provided will precedence over this key.
@param key The key to order by.
*/
- (instancetype)addDescendingOrder:(NSString *)key;
/**
Sort the results using a given sort descriptor.
@warning If a `sortDescriptor` has custom `selector` or `comparator` - they aren't going to be used.
@param sortDescriptor The `NSSortDescriptor` to use to sort the results of the query.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)orderBySortDescriptor:(NSSortDescriptor *)sortDescriptor;
/**
Sort the results using a given array of sort descriptors.
@warning If a `sortDescriptor` has custom `selector` or `comparator` - they aren't going to be used.
@param sortDescriptors An array of `NSSortDescriptor` objects to use to sort the results of the query.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)orderBySortDescriptors:(nullable NSArray<NSSortDescriptor *> *)sortDescriptors;
///--------------------------------------
#pragma mark - Getting Objects by ID
///--------------------------------------
/**
Gets a `PFObject` asynchronously and calls the given block with the result.
@warning This method mutates the query.
It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`.
@param objectId The id of the object that is being requested.
@return The task, that encapsulates the work being done.
*/
- (BFTask<PFGenericObject> *)getObjectInBackgroundWithId:(NSString *)objectId;
/**
Gets a `PFObject` asynchronously and calls the given block with the result.
@warning This method mutates the query.
It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`.
@param objectId The id of the object that is being requested.
@param block The block to execute.
The block should have the following argument signature: `^(NSArray *object, NSError *error)`
*/
- (void)getObjectInBackgroundWithId:(NSString *)objectId
block:(nullable void (^)(PFGenericObject _Nullable object, NSError *_Nullable error))block;
///--------------------------------------
#pragma mark - Getting User Objects
///--------------------------------------
/**
@deprecated Please use [PFUser query] instead.
*/
+ (instancetype)queryForUser PARSE_DEPRECATED("Use [PFUser query] instead.");
///--------------------------------------
#pragma mark - Getting all Matches for a Query
///--------------------------------------
/**
Finds objects *asynchronously* and sets the `NSArray` of `PFObject` objects as a result of the task.
@return The task, that encapsulates the work being done.
*/
- (BFTask<NSArray<PFGenericObject> *> *)findObjectsInBackground;
/**
Finds objects *asynchronously* and calls the given block with the results.
@param block The block to execute.
It should have the following argument signature: `^(NSArray *objects, NSError *error)`
*/
- (void)findObjectsInBackgroundWithBlock:(nullable PFQueryArrayResultBlock)block;
///--------------------------------------
#pragma mark - Getting the First Match in a Query
///--------------------------------------
/**
Gets an object *asynchronously* and sets it as a result of the task.
@warning This method mutates the query. It will reset the limit to `1`.
@return The task, that encapsulates the work being done.
*/
- (BFTask<PFGenericObject> *)getFirstObjectInBackground;
/**
Gets an object *asynchronously* and calls the given block with the result.
@warning This method mutates the query. It will reset the limit to `1`.
@param block The block to execute.
It should have the following argument signature: `^(PFObject *object, NSError *error)`.
`result` will be `nil` if `error` is set OR no object was found matching the query.
`error` will be `nil` if `result` is set OR if the query succeeded, but found no results.
*/
- (void)getFirstObjectInBackgroundWithBlock:(nullable void (^)(PFGenericObject _Nullable object, NSError *_Nullable error))block;
///--------------------------------------
#pragma mark - Counting the Matches in a Query
///--------------------------------------
/**
Counts objects *asynchronously* and sets `NSNumber` with count as a result of the task.
@return The task, that encapsulates the work being done.
*/
- (BFTask<NSNumber *> *)countObjectsInBackground;
/**
Counts objects *asynchronously* and calls the given block with the counts.
@param block The block to execute.
It should have the following argument signature: `^(int count, NSError *error)`
*/
- (void)countObjectsInBackgroundWithBlock:(nullable PFIntegerResultBlock)block;
///--------------------------------------
#pragma mark - Cancelling a Query
///--------------------------------------
/**
Cancels the current network request (if any). Ensures that callbacks won't be called.
*/
- (void)cancel;
///--------------------------------------
#pragma mark - Paginating Results
///--------------------------------------
/**
A limit on the number of objects to return. The default limit is `100`, with a
maximum of 1000 results being returned at a time.
@warning If you are calling `findObjects` with `limit = 1`, you may find it easier to use `getFirst` instead.
*/
@property (nonatomic, assign) NSInteger limit;
/**
The number of objects to skip before returning any.
*/
@property (nonatomic, assign) NSInteger skip;
///--------------------------------------
#pragma mark - Controlling Caching Behavior
///--------------------------------------
/**
The cache policy to use for requests.
Not allowed when Pinning is enabled.
@see fromLocalDatastore
@see fromPin
@see fromPinWithName:
*/
@property (nonatomic, assign) PFCachePolicy cachePolicy;
/**
The age after which a cached value will be ignored
*/
@property (nonatomic, assign) NSTimeInterval maxCacheAge;
/**
Returns whether there is a cached result for this query.
@result `YES` if there is a cached result for this query, otherwise `NO`.
*/
@property (nonatomic, assign, readonly) BOOL hasCachedResult;
/**
Clears the cached result for this query. If there is no cached result, this is a noop.
*/
- (void)clearCachedResult;
/**
Clears the cached results for all queries.
*/
+ (void)clearAllCachedResults;
///--------------------------------------
#pragma mark - Query Source
///--------------------------------------
/**
Change the source of this query to all pinned objects.
@warning Requires Local Datastore to be enabled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
@see cachePolicy
*/
- (instancetype)fromLocalDatastore;
/**
Change the source of this query to the default group of pinned objects.
@warning Requires Local Datastore to be enabled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
@see PFObjectDefaultPin
@see cachePolicy
*/
- (instancetype)fromPin;
/**
Change the source of this query to a specific group of pinned objects.
@warning Requires Local Datastore to be enabled.
@param name The pinned group.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
@see PFObjectDefaultPin
@see cachePolicy
*/
- (instancetype)fromPinWithName:(nullable NSString *)name;
/**
Ignore ACLs when querying from the Local Datastore.
This is particularly useful when querying for objects with Role based ACLs set on them.
@warning Requires Local Datastore to be enabled.
@return The same instance of `PFQuery` as the receiver. This allows method chaining.
*/
- (instancetype)ignoreACLs;
///--------------------------------------
#pragma mark - Advanced Settings
///--------------------------------------
/**
Whether or not performance tracing should be done on the query.
@warning This should not be set to `YES` in most cases.
*/
@property (nonatomic, assign) BOOL trace;
@end
NS_ASSUME_NONNULL_END