Platforms to show: All Mac Windows Linux Cross-Platform

Back to CKQueryMBS class.

CKQueryMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

See also:

CKQueryMBS.Constructor(RecordType as String, predicate as NSPredicateMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a query object with the specified parameters.

recordType: The type of record to search. Specify the name of one of your app’s supported record types. This method throws an exception if this parameter is nil or contains an empty string.
predicate: The search predicate to apply to the prospective records. Only records matching the predicate criteria are returned in the search results. For guidelines on how to construct predicates for your queries, see Predicate Rules for Query Objects. This parameter must not be nil.

Returns an initialized query object.

Discussion
You cannot change the record type and predicate of a query object after you create it. If you want to search for a different set of records using a different set of search criteria, create a new query object. You can add sort descriptors to the query and change them later as needed.

You cannot query for user records and executing a query where the record type is set to CKRecordTypeUserRecordMBS results in an error. You must fetch user records directly using their ID.

See also:

CKQueryMBS.setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the sort descriptors to use when organizing the query results.

CKQueryMBS.sortDescriptors as NSSortDescriptorMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The sort descriptors to use when organizing the query results.

This property contains an array of NSSortDescriptor objects. You can add sort descriptors to a query object and change them later as needed. Each sort descriptor contains a field name of the intended record type and information about whether to sort values in that field in ascending or descending order. The default value of this property is nil, which means that records are returned in an indeterminate order.

The order of the items in the array matches the order in which the sort descriptors are applied to the results. In other words, the first sort descriptor in the array is applied first, followed by the second sort descriptor if needed, and the third, and so on.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...