File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 65
65
// /--------------------------------------
66
66
67
67
- (void )includeKey : (NSString *)key ;
68
+ - (void )includeKeys : (NSArray <NSString *> *)keys ;
68
69
69
70
// /--------------------------------------
70
71
#pragma mark - Selected Keys
Original file line number Diff line number Diff line change @@ -151,6 +151,14 @@ - (void)includeKey:(NSString *)key {
151
151
}
152
152
}
153
153
154
+ - (void )includeKeys : (NSArray <NSString *> *)keys {
155
+ if (!_includedKeys) {
156
+ _includedKeys = [NSMutableSet setWithArray: keys];
157
+ } else {
158
+ [_includedKeys addObjectsFromArray: keys];
159
+ }
160
+ }
161
+
154
162
// /--------------------------------------
155
163
#pragma mark - Selected Keys
156
164
// /--------------------------------------
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *_Nullable obje
83
83
// /--------------------------------------
84
84
85
85
/* *
86
- Make the query include PFObjects that have a reference stored at the provided key.
86
+ Make the query include `PFObject`s that have a reference stored at the provided key.
87
87
88
88
This has an effect similar to a join. You can use dot notation to specify which fields in
89
89
the included object are also fetch.
@@ -94,6 +94,15 @@ typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *_Nullable obje
94
94
*/
95
95
- (instancetype )includeKey : (NSString *)key ;
96
96
97
+ /* *
98
+ Make the query include `PFObject`s that have a reference stored at the provided keys.
99
+
100
+ @param keys The keys to load child `PFObject`s for.
101
+
102
+ @return The same instance of `PFQuery` as the receiver. This allows method chaining.
103
+ */
104
+ - (instancetype )includeKeys : (NSArray <NSString *> *)keys ;
105
+
97
106
/* *
98
107
Make the query restrict the fields of the returned `PFObject`s to include only the provided keys.
99
108
Original file line number Diff line number Diff line change @@ -405,6 +405,12 @@ - (instancetype)includeKey:(NSString *)key {
405
405
return self;
406
406
}
407
407
408
+ - (instancetype )includeKeys : (NSArray <NSString *> *)keys {
409
+ [self checkIfCommandIsRunning ];
410
+ [self .state includeKeys: keys];
411
+ return self;
412
+ }
413
+
408
414
// /--------------------------------------
409
415
#pragma mark - Select
410
416
// /--------------------------------------
You can’t perform that action at this time.
0 commit comments