ExpressionProtocol

``public protocol ExpressionProtocol``

Query expression.

• ``` multiply(_:) ```

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

Declaration

Swift

``func multiply(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be multipled by.

Return Value

A multiply expression.

• ``` divide(_:) ```

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

Declaration

Swift

``func divide(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be devided by.

Return Value

A divide expression.

• ``` modulo(_:) ```

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

Declaration

Swift

``func modulo(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be moduloed by.

Return Value

A modulo expression.

• ``` add(_:) ```

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

Declaration

Swift

``func add(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to add to the current expression.

Return Value

• ``` subtract(_:) ```

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

Declaration

Swift

``func subtract(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to substract from the current expression.

Return Value

A subtract expression.

• ``` lessThan(_:) ```

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

Declaration

Swift

``func lessThan(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A less than expression.

• ``` lessThanOrEqualTo(_:) ```

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

Swift

``func lessThanOrEqualTo(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A less than or equal to expression.

• ``` greaterThan(_:) ```

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

Declaration

Swift

``func greaterThan(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A greater than expression.

• ``` greaterThanOrEqualTo(_:) ```

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

Swift

``func greaterThanOrEqualTo(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A greater than or equal to expression.

• ``` equalTo(_:) ```

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

Declaration

Swift

``func equalTo(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

An equal to expression.

• ``` notEqualTo(_:) ```

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

Declaration

Swift

``func notEqualTo(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A NOT equal to expression.

• ``` like(_:) ```

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

Declaration

Swift

``func like(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A Like expression.

• ``` regex(_:) ```

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

Declaration

Swift

``func regex(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

A regex match expression.

• ``` is(_:) ```

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

Declaration

Swift

``func `is`(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

An IS expression.

• ``` isNot(_:) ```

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

Declaration

Swift

``func isNot(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to be compared with the current expression.

Return Value

An IS NOT expression.

• ``` isNullOrMissing() ```

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

Declaration

Swift

``func isNullOrMissing() -> ExpressionProtocol``

Return Value

An IS NULL expression.

• ``` notNullOrMissing() ```

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

Declaration

Swift

``func notNullOrMissing() -> ExpressionProtocol``

Return Value

An IS NOT NULL expression.

• ``` and(_:) ```

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

Declaration

Swift

``func and(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to AND with the current expression.

Return Value

A logical AND expression.

• ``` or(_:) ```

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

Declaration

Swift

``func or(_ expression: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression ``` The expression to OR with the current expression.

Return Value

A logical OR Expression.

• ``` between(_:and:) ```

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

Declaration

Swift

``func between(_ expression1: ExpressionProtocol, and expression2: ExpressionProtocol) -> ExpressionProtocol``

Parameters

 ``` expression1 ``` The inclusive lower bound expression. ``` expression2 ``` The inclusive upper bound expression.

Return Value

A BETWEEN expression.

• ``` in(_:) ```

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

Declaration

Swift

``func `in`(_ expressions: [ExpressionProtocol]) -> ExpressionProtocol``

Parameters

 ``` expressions ``` The expression array to be evaluated with.

Return Value

• ``` collate(_:) ```

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

Swift

``func collate(_ collation: CollationProtocol) -> ExpressionProtocol``

Parameters

 ``` collation ``` The collation object.

Return Value

A Collate expression.