Expression
public class Expression
An Expression represents an expression used for constructing a query statement.
-
Creates a property expression representing the value of the given property name.
Declaration
Swift
public static func property(_ property: String) -> PropertyExpression
Parameters
property
The property name in the key path format.
Return Value
A property expression.
-
Creates a parameter expression with the given parameter name.
Declaration
Swift
public static func parameter(_ name: String) -> Expression
Parameters
name
The parameter name
Return Value
A 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
Swift
public func collate(_ collation: Collation) -> Expression
Parameters
collation
The collation object.
Return Value
A Collate expression.
-
Creates a negated expression representing the negated result of the given expression.
Declaration
Swift
public static func negated(_ expression: Any) -> Expression
Parameters
expression
The expression to be negated.
Return Value
A negated expression.
-
Creates a negated expression representing the negated result of the given expression.
Declaration
Swift
public static func not(_ expression: Any) -> Expression
Parameters
expression
The expression to be negated.
Return Value
A negated expression
-
Creates a multiply expression to multiply the current expression by the given expression.
Declaration
Swift
public func multiply(_ expression: Any) -> Expression
Parameters
expression
The expression to be multipled by.
Return Value
A multiply expression.
-
Creates a divide expression to divide the current expression by the given expression.
Declaration
Swift
public func divide(_ expression: Any) -> Expression
Parameters
expression
The expression to be devided by.
Return Value
A divide expression.
-
Creates a modulo expression to modulo the current expression by the given expression.
Declaration
Swift
public func modulo(_ expression: Any) -> Expression
Parameters
expression
The expression to be moduloed by.
Return Value
A modulo expression.
-
Creates an add expression to add the given expression to the current expression.
Declaration
Swift
public func add(_ expression: Any) -> Expression
Parameters
expression
The expression to add to the current expression.
Return Value
An add expression.
-
Creates a subtract expression to subtract the given expression from the current expression.
Declaration
Swift
public func subtract(_ expression: Any) -> Expression
Parameters
expression
The expression to substract from the current expression.
Return Value
A subtract expression.
-
Creates a less than expression that evaluates whether or not the current expression is less than the given expression.
Declaration
Swift
public func lessThan(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A 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
Swift
public func lessThanOrEqualTo(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A 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
Swift
public func greaterThan(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A 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
Swift
public func greaterThanOrEqualTo(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A 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
Swift
public func equalTo(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
An 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
Swift
public func notEqualTo(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A NOT equal to expression.
-
Creates a logical AND expression that performs logical AND operation with the current expression.
Declaration
Swift
public func and(_ expression: Any) -> Expression
Parameters
expression
The expression to AND with the current expression.
Return Value
A logical AND expression.
-
Creates a logical OR expression that performs logical OR operation with the current expression.
Declaration
Swift
public func or(_ expression: Any) -> Expression
Parameters
expression
The expression to OR with the current expression.
Return Value
A logical OR Expression.
-
Creates a Like expression that evaluates whether or not the current expression is LIKE the given expression.
Declaration
Swift
public func like(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A Like expression.
-
Creates a regex match expression that evaluates whether or not the current expression regex matches the given expression.
Declaration
Swift
public func regex(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
A regex match expression.
-
Creates an IS NULL OR MISSING expression that evaluates whether or not the current expression is null or missing.
Declaration
Swift
public func isNullOrMissing() -> Expression
Return Value
An IS NULL expression.
-
Creates an IS NOT NULL OR MISSING expression that evaluates whether or not the current expression is NOT null or missing.
Declaration
Swift
public func notNullOrMissing() -> Expression
Return Value
An IS NOT NULL expression.
-
Creates an IS expression that evaluates whether or not the current expression is equal to the given expression.
Declaration
Swift
public func `is`(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
An IS expression.
-
Creates an IS NOT expression that evaluates whether or not the current expression is not equal to the given expression.
Declaration
Swift
public func isNot(_ expression: Any) -> Expression
Parameters
expression
The expression to be compared with the current expression.
Return Value
An IS NOT expression.
-
Creates a between expression that evaluates whether or not the current expression is between the given expressions inclusively.
Declaration
Swift
public func between(_ expression1: Any, and expression2: Any) -> Expression
Parameters
expression1
The inclusive lower bound expression.
expression2
The inclusive upper bound expression.
Return Value
<#return value description#>
-
Creates an IN expression that evaluates whether or not the current expression is in the given expressions.
Declaration
Swift
public func `in`(_ expressions: [Any]) -> Expression
Parameters
expressions
The expression array to be evaluated with.
Return Value
An IN exprssion.
-
Creates a NOT IN expression that evaluates whether or not the current expression is not in the given expressions.
Declaration
Swift
public func notIn(_ expressions:[Any]) -> Expression
Parameters
expressions
The expression array to be evaluated with.
Return Value
An IN exprssion.
-
Declaration
Swift
public var description: String