CBLQueryOrderBy

@interface CBLQueryOrderBy : NSObject

An CBLQueryOrderBy represents a query ORDER BY clause of a SQL or N1QL query by sepecifying 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.

  • Construct a chain of multiple CBLQueryOrderBy instances.

    Declaration

    Objective-C

    + (nonnull CBLQueryOrderBy *)orderBy:(nonnull CBLQueryOrderBy *)orderBy, ...;
  • Construct a CBLQuerySortOrder instance with a given property name.

    Declaration

    Objective-C

    + (nonnull CBLQuerySortOrder *)property:(nonnull NSString *)name;

    Swift

    class func property(_ name: String) -> CBLQuerySortOrder
  • Construct a CBLQuerySortOrder instance with a given expression.

    Declaration

    Objective-C

    + (nonnull CBLQuerySortOrder *)expression:
        (nonnull CBLQueryExpression *)expression;

    Swift

    class func expression(_ expression: CBLQueryExpression) -> CBLQuerySortOrder
  • Undocumented

    Declaration

    Objective-C

    @interface CBLQueryOrderBy : NSObject