Expression

public final class Expression

An Expression represents an expression used for constructing a query statement.

  • Create a property expression representing the value of the given property name. @param property property name in the key path format. @return a property expression.

    Declaration

    Swift

    public static func property(_ property: String) -> Expression
  • Create a negated expression representing the negated result of the given expression. @param expression the expression to be negated. @return a negated expression.

    Declaration

    Swift

    public static func negated(_ expression: Any) -> Expression
  • Create a negated expression representing the negated result of the given expression. @param expression the expression to be negated. @return a negated expression

    Declaration

    Swift

    public static func not(_ expression: Any) -> Expression
  • Create a multiply expression to multiply the current expression by the given expression. @param expression the expression to be multipled by. @return a multiply expression.

    Declaration

    Swift

    public func multiply(_ expression: Any) -> Expression
  • Create a divide expression to divide the current expression by the given expression. @param expression the expression to be devided by. @return a divide expression.

    Declaration

    Swift

    public func divide(_ expression: Any) -> Expression
  • Create a modulo expression to modulo the current expression by the given expression. @param expression the expression to be moduloed by. @return a modulo expression.

    Declaration

    Swift

    public func modulo(_ expression: Any) -> Expression
  • Create an add expression to add the given expression to the current expression. @param expression the expression to add to the current expression. @return an add expression.

    Declaration

    Swift

    public func add(_ expression: Any) -> Expression
  • Create a subtract expression to subtract the given expression from the current expression. @param expression the expression to substract from the current expression. @return a subtract expression.

    Declaration

    Swift

    public func subtract(_ expression: Any) -> Expression
  • Create a less than expression that evaluates whether or not the current expression is less than the given expression. @param expression the expression to be compared with the current expression. @return a less than expression.

    Declaration

    Swift

    public func lessThan(_ expression: Any) -> Expression
  • Create a NOT less than expression that evaluates whether or not the current expression is not less than the given expression. @param expression the expression to be compared with the current expression. @return a NOT less than expression.

    Declaration

    Swift

    public func notLessThan(_ expression: Any) -> Expression
  • Create a less than or equal to expression that evaluates whether or not the current expression is less than or equal to the given expression. @param expression the expression to be compared with the current expression. @return a less than or equal to expression.

    Declaration

    Swift

    public func lessThanOrEqualTo(_ expression: Any) -> Expression
  • Create 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. @param expression the expression to be compared with the current expression. @return a NOT less than or equal to expression.

    Declaration

    Swift

    public func notLessThanOrEqualTo(_ expression: Any) -> Expression
  • Create a greater than expression that evaluates whether or not the current expression is greater than the given expression. @param expression the expression to be compared with the current expression. @return a greater than expression.

    Declaration

    Swift

    public func greaterThan(_ expression: Any) -> Expression
  • Create a NOT greater than expression that evaluates whether or not the current expression is not greater than the given expression. @param expression the expression to be compared with the current expression. @return a NOT greater than expression.

    Declaration

    Swift

    public func notGreaterThan(_ expression: Any) -> Expression
  • Create a greater than or equal to expression that evaluates whether or not the current expression is greater than or equal to the given expression. @param expression the expression to be compared with the current expression. @return a greater than or equal to expression.

    Declaration

    Swift

    public func greaterThanOrEqualTo(_ expression: Any) -> Expression
  • Create 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. @param expression the expression to be compared with the current expression. @return a NOT greater than or equal to expression.

    Declaration

    Swift

    public func notGreaterThanOrEqualTo(_ expression: Any) -> Expression
  • Create an equal to expression that evaluates whether or not the current expression is equal to the given expression. @param expression the expression to be compared with the current expression. @return an equal to expression.

    Declaration

    Swift

    public func equalTo(_ expression: Any) -> Expression
  • Create a NOT equal to expression that evaluates whether or not the current expression is not equal to the given expression. @param expression the expression to be compared with the current expression. @return a NOT equal to expression.

    Declaration

    Swift

    public func notEqualTo(_ expression: Any) -> Expression
  • Create a logical AND expression that performs logical AND operation with the current expression. @param expression the expression to AND with the current expression. @return a logical AND expression.

    Declaration

    Swift

    public func and(_ expression: Any) -> Expression
  • Create a logical OR expression that performs logical OR operation with the current expression. @param expression the expression to OR with the current expression. @return a logical OR Expression.

    Declaration

    Swift

    public func or(_ expression: Any) -> Expression
  • Create a Like expression that evaluates whether or not the current expression is LIKE the given expression. @param expression the expression to be compared with the current expression. @return a Like expression.

    Declaration

    Swift

    public func like(_ expression: Any) -> Expression
  • Create a NOT Like expression that evaluates whether or not the current expression is NOT LIKE the given expression. @param expression the expression to be compared with the current expression. @return a NOT Like expression.

    Declaration

    Swift

    public func notLike(_ expression: Any) -> Expression
  • Create a regex match expression that evaluates whether or not the current expression regex matches the given expression. @param expression the expression to be compared with the current expression. @return a regex match expression.

    Declaration

    Swift

    public func regex(_ expression: Any) -> Expression
  • Create a regex NOT match expression that evaluates whether or not the current expression regex NOT matches the given expression. @param expression the expression to be compared with the current expression. @return a regex NOT match expression.

    Declaration

    Swift

    public func notRegex(_ expression: Any) -> Expression
  • Create a full text match expression that evaluates whether or not the current expression full text matches the given expression. @param expression the expression to be compared with the current expression. @return a full text match expression.

    Declaration

    Swift

    public func match(_ expression: Any) -> Expression
  • Create a full text NOT match expression that evaluates whether or not the current expression full text NOT matches the given expression. @param expression the expression to be compared with the current expression. @return a full text NOT match expression.

    Declaration

    Swift

    public func notMatch(_ expression: Any) -> Expression
  • Create an IS NULL expression that evaluates whether or not the current expression is null. @return an IS NULL expression.

    Declaration

    Swift

    public func isNull() -> Expression
  • Create an IS NOT NULL expression that evaluates whether or not the current expression is NOT null. @return an IS NOT NULL expression.

    Declaration

    Swift

    public func notNull() -> Expression
  • Create an IS expression that evaluates whether or not the current expression is equal to the given expression. @param expression the expression to be compared with the current expression. @return an IS expression.

    Declaration

    Swift

    public func `is`(_ expression: Any) -> Expression
  • Create an IS NOT expression that evaluates whether or not the current expression is not equal to the given expression. @param expression the expression to be compared with the current expression. @return an IS NOT expression.

    Declaration

    Swift

    public func isNot(_ expression: Any) -> Expression
  • Create a between expression that evaluates whether or not the current expression is between the given expressions inclusively. @param expression1 the inclusive lower bound expression. @param expression2 the inclusive upper bound expression. @return a between expression.

    Declaration

    Swift

    public func between(_ expression1: Any, and expression2: Any) -> Expression
  • Create a NOT between expression that evaluates whether or not the current expression is not between the given expressions inclusively. @param expression1 the inclusive lower bound expression. @param expression2 the inclusive upper bound expression. @return a NOT between expression.

    Declaration

    Swift

    public func notBetween(_ expression1: Any, and expression2: Any) -> Expression
  • Create an IN expression that evaluates whether or not the current expression is in the given expressions. @param expressions the expression array to be evaluated with. @return an IN exprssion.

    Declaration

    Swift

    public func `in`(_ expressions: [Any]) -> Expression
  • Create a NOT IN expression that evaluates whether or not the current expression is not in the given expressions. @param expressions the expression array to be evaluated with. @return an IN exprssion.

    Declaration

    Swift

    public func notIn(_ expressions:[Any]) -> Expression