@@ -353,9 +353,11 @@ public struct Query<T>: ParseTypeable where T: ParseObject {
353
353
/**
354
354
Make the query restrict the fields of the returned `ParseObject`s to include only the provided keys.
355
355
If this is called multiple times, then all of the keys specified in each of the calls will be included.
356
- - parameter keys: A variadic list of keys include in the result.
356
+ - parameter keys: A variadic list of keys to include in the result.
357
357
- returns: The mutated instance of query for easy chaining.
358
358
- warning: Requires Parse Server 5.0.0+.
359
+ - note: When using the `Query` for `ParseLiveQuery`, setting `fields` will take precedence
360
+ over `select`. If `fields` are not set, the `select` keys will be used.
359
361
*/
360
362
public func select( _ keys: String ... ) -> Query < T > {
361
363
self . select ( keys)
@@ -367,6 +369,8 @@ public struct Query<T>: ParseTypeable where T: ParseObject {
367
369
- parameter keys: An array of keys to include in the result.
368
370
- returns: The mutated instance of query for easy chaining.
369
371
- warning: Requires Parse Server 5.0.0+.
372
+ - note: When using the `Query` for `ParseLiveQuery`, setting `fields` will take precedence
373
+ over `select`. If `fields` are not set, the `select` keys will be used.
370
374
*/
371
375
public func select( _ keys: [ String ] ) -> Query < T > {
372
376
var mutableQuery = self
@@ -399,13 +403,16 @@ public struct Query<T>: ParseTypeable where T: ParseObject {
399
403
}
400
404
401
405
/**
402
- A variadic list of fields to receive when receiving a `ParseLiveQuery`.
406
+ A variadic list of selected fields to receive updates on when the `Query` is used as a
407
+ `ParseLiveQuery`.
403
408
404
409
Suppose the `ParseObject` Player contains three fields name, id and age.
405
410
If you are only interested in the change of the name field, you can set `query.fields` to "name".
406
411
In this situation, when the change of a Player `ParseObject` fulfills the subscription, only the
407
412
name field will be sent to the clients instead of the full Player `ParseObject`.
408
413
If this is called multiple times, then all of the keys specified in each of the calls will be received.
414
+ - note: Setting `fields` will take precedence over `select`. If `fields` are not set, the
415
+ `select` keys will be used.
409
416
- warning: This is only for `ParseLiveQuery`.
410
417
- parameter keys: A variadic list of fields to receive back instead of the whole `ParseObject`.
411
418
- returns: The mutated instance of query for easy chaining.
@@ -415,13 +422,16 @@ public struct Query<T>: ParseTypeable where T: ParseObject {
415
422
}
416
423
417
424
/**
418
- A list of fields to receive when receiving a `ParseLiveQuery`.
425
+ A list of fields to receive updates on when the `Query` is used as a
426
+ `ParseLiveQuery`.
419
427
420
428
Suppose the `ParseObject` Player contains three fields name, id and age.
421
429
If you are only interested in the change of the name field, you can set `query.fields` to "name".
422
430
In this situation, when the change of a Player `ParseObject` fulfills the subscription, only the
423
431
name field will be sent to the clients instead of the full Player `ParseObject`.
424
432
If this is called multiple times, then all of the keys specified in each of the calls will be received.
433
+ - note: Setting `fields` will take precedence over `select`. If `fields` are not set, the
434
+ `select` keys will be used.
425
435
- warning: This is only for `ParseLiveQuery`.
426
436
- parameter keys: An array of fields to receive back instead of the whole `ParseObject`.
427
437
- returns: The mutated instance of query for easy chaining.
0 commit comments