@@ -38,6 +38,8 @@ + (nullable instancetype)findCommandForClassWithName:(NSString *)className
3838 includedKeys : (NSSet *)includedKeys
3939 limit : (NSInteger )limit
4040 skip : (NSInteger )skip
41+ explain : (BOOL )explain
42+ hint : (NSString *)hint
4143 extraOptions : (NSDictionary *)extraOptions
4244 tracingEnabled : (BOOL )trace
4345 sessionToken : (NSString *)sessionToken
@@ -48,6 +50,8 @@ + (nullable instancetype)findCommandForClassWithName:(NSString *)className
4850 includedKeys: includedKeys
4951 limit: limit
5052 skip: skip
53+ explain: explain
54+ hint: hint
5155 extraOptions: extraOptions
5256 tracingEnabled: trace
5357 error: error];
@@ -100,6 +104,8 @@ + (nullable NSDictionary *)findCommandParametersForQueryState:(PFQueryState *)qu
100104 includedKeys: queryState.includedKeys
101105 limit: queryState.limit
102106 skip: queryState.skip
107+ explain: queryState.explain
108+ hint: queryState.hint
103109 extraOptions: queryState.extraOptions
104110 tracingEnabled: queryState.trace
105111 error: error];
@@ -111,6 +117,8 @@ + (nullable NSDictionary *)findCommandParametersWithOrder:(NSString *)order
111117 includedKeys : (NSSet *)includedKeys
112118 limit : (NSInteger )limit
113119 skip : (NSInteger )skip
120+ explain : (BOOL )explain
121+ hint : (NSString *)hint
114122 extraOptions : (NSDictionary *)extraOptions
115123 tracingEnabled : (BOOL )trace
116124 error : (NSError **)error {
@@ -139,6 +147,12 @@ + (nullable NSDictionary *)findCommandParametersWithOrder:(NSString *)order
139147 // TODO: (nlutsenko) Double check that tracing still works. Maybe create test for it.
140148 parameters[@" trace" ] = @" 1" ;
141149 }
150+ if (explain) {
151+ parameters[@" explain" ] = @" 1" ;
152+ }
153+ if (hint != nil ) {
154+ parameters[@" hint" ] = hint;
155+ }
142156 [extraOptions enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop) {
143157 parameters[key] = obj;
144158 }];
@@ -165,6 +179,8 @@ + (nullable NSDictionary *)findCommandParametersWithOrder:(NSString *)order
165179 includedKeys: subquery.state.includedKeys
166180 limit: subquery.state.limit
167181 skip: subquery.state.skip
182+ explain: subquery.state.explain
183+ hint: subquery.state.hint
168184 extraOptions: nil
169185 tracingEnabled: NO
170186 error: &encodingError];
@@ -224,8 +240,10 @@ + (nullable id)_encodeSubqueryIfNeeded:(id)object error:(NSError * __autoreleasi
224240 conditions: subquery.state.conditions
225241 selectedKeys: subquery.state.selectedKeys
226242 includedKeys: subquery.state.includedKeys
227- limit: subquery.state.limit
243+ limit: subquery.state.limit
228244 skip: subquery.state.skip
245+ explain: subquery.state.explain
246+ hint: subquery.state.hint
229247 extraOptions: subquery.state.extraOptions
230248 tracingEnabled: NO
231249 error: &encodingError];
0 commit comments