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) -> PropertyExpressionParameters
propertyThe property name in the key path format.
Return Value
A property expression.
-
Get a Meta object which is a factory object for creating metadata property expressions.
Declaration
Swift
public static func meta() -> MetaReturn Value
A Meta object.
-
Creates a parameter expression with the given parameter name.
Declaration
Swift
public static func parameter(_ name: String) -> ExpressionParameters
nameThe 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) -> ExpressionParameters
collationThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A less than expression.
-
Creates a NOT less than expression that evaluates whether or not the current expression is not less than the given expression.
Declaration
Swift
public func notLessThan(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A NOT 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A less than or equal to expression.
-
Creates a NOT less than or equal to expression that evaluates whether or not the current expression is not less than or equal to the given expression.
Declaration
Swift
public func notLessThanOrEqualTo(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A NOT 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A greater than expression.
-
Creates a NOT greater than expression that evaluates whether or not the current expression is not greater than the given expression.
Declaration
Swift
public func notGreaterThan(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A NOT 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A greater than or equal to expression.
-
Creates a NOT greater than or equal to expression that evaluates whether or not the current expression is not greater than or equal to the given expression.
Declaration
Swift
public func notGreaterThanOrEqualTo(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A NOT 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A Like expression.
-
Creates a NOT Like expression that evaluates whether or not the current expression is NOT LIKE the given expression.
Declaration
Swift
public func notLike(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A NOT 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) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A regex match expression.
-
Creates a regex NOT match expression that evaluates whether or not the current expression regex NOT matches the given expression.
Declaration
Swift
public func notRegex(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A regex NOT match expression.
-
Creates a full text match expression that evaluates whether or not the current expression full text matches the given expression.
Declaration
Swift
public func match(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A full text match expression.
-
Creates a full text NOT match expression that evaluates whether or not the current expression full text NOT matches the given expression.
Declaration
Swift
public func notMatch(_ expression: Any) -> ExpressionParameters
expressionThe expression to be compared with the current expression.
Return Value
A full text NOT 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() -> ExpressionReturn 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() -> ExpressionReturn 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expressionThe 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) -> ExpressionParameters
expression1The inclusive lower bound expression.
expression2The inclusive upper bound expression.
Return Value
<#return value description#>
-
Creates a NOT between expression that evaluates whether or not the current expression is not between the given expressions inclusively.
Declaration
Swift
public func notBetween(_ expression1: Any, and expression2: Any) -> ExpressionParameters
expression1The inclusive lower bound expression.
expression2The inclusive upper bound expression.
Return Value
A NOT between expression.
-
Creates an IN expression that evaluates whether or not the current expression is in the given expressions.
Declaration
Swift
public func `in`(_ expressions: [Any]) -> ExpressionParameters
expressionsThe 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]) -> ExpressionParameters
expressionsThe expression array to be evaluated with.
Return Value
An IN exprssion.
-
Creates a variable expression. The variable are used to represent each item in an array in the quantified operators (ANY/ANY AND EVERY/EVERY
IN SATISFIES ) to evaluate expressions over an array. Declaration
Swift
public static func variable(_ name: String) -> ExpressionParameters
nameThe variable name.
Return Value
A variable expression.
-
Creates an ANY Quantified operator (ANY
IN SATISFIES ) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each item of which will be evaluated against the satisfies expression. The ANY operator returns TRUE if at least one of the items in the array satisfies the given satisfies expression. Declaration
Swift
public static func any(_ variable: String) -> InParameters
variableThe variable name.
Return Value
An In object.
-
Creates an ANY AND EVERY Quantified operator (ANY AND EVERY
IN SATISFIES ) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each of which will be evaluated against the satisfies expression. The ANY AND EVERY operator returns TRUE if the array is NOT empty, and at least one of the items in the array satisfies the given satisfies expression. Declaration
Swift
public static func anyAndEvery(_ variable: String) -> InParameters
variableThe variable name.
Return Value
An In object.
-
Creates an EVERY Quantified operator (EVERY
IN SATISFIES ) with the given variable name. The method returns an IN clause object that is used for specifying an array object or an expression evaluated as an array object, each of which will be evaluated against the satisfies expression. The EVERY operator returns TRUE if the array is empty OR every item in the array satisfies the given satisfies expression. Declaration
Swift
public static func every(_ variable: String) -> InParameters
variableThe variable name.
Return Value
An In object.
-
Declaration
Swift
public var description: String
Expression Class Reference