CBLQueryOrderBy
@interface CBLQueryOrderBy : NSObject
A CBLQueryOrderBy represents a query ORDER BY clause by specifying properties or expressions that the result rows should be sorted by. A CBLQueryOrderBy can be construct as a single CBLQuerySortOrder instance with a propery name or an expression instance or as a chain of multiple CBLQueryOrderBy instances.
-
Create a chain of multiple CBLQueryOrderBy instances for constructing an ORDER BY clause of the query. - parameter: orders an array of CBLQueryOrderBy. - returns: a CBLQueryOrderBy instance.
Declaration
Objective-C
+ (nonnull CBLQueryOrderBy *)orderBy: (nonnull NSArray<CBLQueryOrderBy *> *)orders;Swift
/*not inherited*/ init(_ orders: [CBLQueryOrderBy])Parameters
ordersan array of CBLQueryOrderBy.
Return Value
a CBLQueryOrderBy instance.
-
Create a sort order instance with a given property name. - parameter: name a propert name in key path format. - returns: a sort order instance.
Declaration
Objective-C
+ (nonnull CBLQuerySortOrder *)property:(nonnull NSString *)name;Swift
class func property(_ name: String) -> CBLQuerySortOrderParameters
namea propert name in key path format.
Return Value
a sort order instance.
-
Create a sort order instance with a given expression. - parameter: expression an expression instance. - returns: a sort order instance.
Declaration
Objective-C
+ (nonnull CBLQuerySortOrder *)expression: (nonnull CBLQueryExpression *)expression;Swift
class func expression(_ expression: CBLQueryExpression) -> CBLQuerySortOrderParameters
expressionan expression instance.
Return Value
a sort order instance.
-
Undocumented
Declaration
Objective-C
@interface CBLQueryOrderBy : NSObject
CBLQueryOrderBy Class Reference