CBLQueryExpression

@interface CBLQueryExpression : NSObject

A CBLQueryExpression represents an expression used for constructing a query statement.

  • Creates a property expression representing the value of the given property name.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)property:(nonnull NSString *)property;

    Parameters

    property

    The property name in the key path format.

    Return Value

    The property expression.

  • Creates a property expression representing the value of the given property name.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)property:(nonnull NSString *)property
                                        from:(nullable NSString *)alias;

    Parameters

    property

    Property name in the key path format.

    alias

    The data source alias name.

    Return Value

    The property expression.

  • Creates a parameter expression with the given parameter name.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)parameterNamed:(nonnull NSString *)name;

    Parameters

    name

    The parameter name

    Return Value

    The parameter expression.

  • Creates a collate expression with the given Collation specification. Commonly the collate expression is used in the Order BY clause or the string comparison expression (e.g. equalTo or lessThan) to specify how the two strings are compared.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)collate:(nonnull CBLQueryCollation *)collation;

    Parameters

    collation

    The Collation object.

    Return Value

    The collate expression.

  • Creates a negated expression representing the negated result of the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *)negated:(nonnull id)expression;

    Parameters

    expression

    The expression to be negated.

    Return Value

    The negated expression.

  • Creates a negated expression representing the negated result of the given expression.

    Declaration

    Objective-C

    + (nonnull CBLQueryExpression *) not:(nonnull id)expression;

    Parameters

    expression

    The expression to be negated.

    Return Value

    The negated expression.

  • Creates a concat expression to concatenate the current expression with the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)concat:(nonnull id)expression;

    Parameters

    expression

    The expression to be concatenated with.

    Return Value

    The concat expression.

  • Creates a multiply expression to multiply the current expression by the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)multiply:(nonnull id)expression;

    Parameters

    expression

    The expression to be multipled by.

    Return Value

    The multiply expression.

  • Creates a divide expression to divide the current expression by the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)divide:(nonnull id)expression;

    Parameters

    expression

    The expression to be devided by.

    Return Value

    The divide expression.

  • Creates a modulo expression to modulo the current expression by the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)modulo:(nonnull id)expression;

    Parameters

    expression

    The expression to be moduloed by.

    Return Value

    The modulo expression.

  • Creates an add expression to add the given expression to the current expression .

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)add:(nonnull id)expression;

    Parameters

    expression

    The expression to add to the current expression.

    Return Value

    The add expression.

  • Creates a subtract expression to subtract the given expression from the current expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)subtract:(nonnull id)expression;

    Parameters

    expression

    The expression to substract from the current expression.

    Return Value

    The subtract expression.

  • Creates a less than expression that evaluates whether or not the current expression is less than the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)lessThan:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The less than expression.

  • Creates a less than or equal to expression that evaluates whether or not the current expression is less than or equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)lessThanOrEqualTo:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The less than or equal to expression.

  • Creates a greater than expression that evaluates whether or not the current expression is greater than the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)greaterThan:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The greater than expression.

  • Creates a greater than or equal to expression that evaluates whether or not the current expression is greater than or equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)greaterThanOrEqualTo:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The greater than or equal to expression.

  • Creates an equal to expression that evaluates whether or not the current expression is equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)equalTo:(nullable id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The equal to expression.

  • Creates a NOT equal to expression that evaluates whether or not the current expression is not equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)notEqualTo:(nullable id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The NOT equal to expression.

  • Creates a logical AND expression that performs logical AND operation with the current expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)andExpression:(nonnull id)expression;

    Parameters

    expression

    The expression to AND with the current expression.

    Return Value

    The logical AND expression.

  • Creates a logical OR expression that performs logical OR operation with the current expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)orExpression:(nonnull id)expression;

    Parameters

    expression

    The expression to OR with the current expression.

    Return Value

    The logical OR Expression.

  • Creates a Like expression that evaluates whether or not the current expression is LIKE the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)like:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The Like expression.

  • Creates a regex match expression that evaluates whether or not the current expression regex matches the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)regex:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The regex match expression.

  • Creates an IS NULL OR MISSING expression that evaluates whether or not the current expression is null or missing.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)isNullOrMissing;

    Return Value

    The IS NULL OR MISSING expression.

  • Creates an IS NOT NULL OR MISSING expression that evaluates whether or not the current expression is NOT null or missing.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)notNullOrMissing;

    Return Value

    The IS NOT NULL OR MISSING expression.

  • Creates an IS expression that evaluates whether or not the current expression is equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)is:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The IS expression.

  • Creates an IS NOT expression that evaluates whether or not the current expression is not equal to the given expression.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)isNot:(nonnull id)expression;

    Parameters

    expression

    The expression to be compared with the current expression.

    Return Value

    The IS NOT expression.

  • Creates a between expression that evaluates whether or not the current expression is between the given expressions inclusively.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)between:(nonnull id)expression1
                                        and:(nonnull id)expression2;

    Parameters

    expression1

    The inclusive lower bound expression.

    expression2

    The inclusive upper bound expression.

    Return Value

    The between expression.

  • Creates an IN expression that evaluates whether or not the current expression is in the given expressions.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)in:(nonnull NSArray *)expressions;

    Parameters

    expressions

    The expression array to be evaluated with.

    Return Value

    The IN exprssion.

  • Creates a NOT IN expression that evaluates whether or not the current expression is not in the given expressions.

    Declaration

    Objective-C

    - (nonnull CBLQueryExpression *)notIn:(nonnull NSArray *)expressions;

    Parameters

    expressions

    The expression array to be evaluated with.

    Return Value

    The IN exprssion.

  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;