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;

    Parameters

    orders
  • 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;

    Parameters

    name
  • 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;

    Parameters

    expression
  • Undocumented

    Declaration

    Objective-C

    @interface CBLQueryOrderBy : NSObject