Expression
public final class Expression
Query expression factory.
-
Creates a property expression representing the value of the given property name.
Declaration
Swift
public static func property(_ property: String) -> PropertyExpressionProtocolParameters
propertyThe property name in the key path format.
Return Value
A property expression.
-
Creates a star expression.
Declaration
Swift
public static func all() -> PropertyExpressionProtocolReturn Value
A star expression.
-
Creates a value expression. The supported value types are String, NSNumber, int, int64, float, double, boolean, Date and null.
Declaration
Swift
public static func value(_ value: Any?) -> ExpressionProtocolParameters
valueThe value.
Return Value
The value expression.
-
Creates a string expression.
Declaration
Swift
public static func string(_ value: String?) -> ExpressionProtocolParameters
valueThe string value.
Return Value
The string expression.
-
Creates a number expression.
Declaration
Swift
public static func number(_ value: NSNumber?) -> ExpressionProtocolParameters
valueThe number value.
Return Value
The number expression.
-
Creates an integer expression.
Declaration
Swift
public static func int(_ value: Int) -> ExpressionProtocolParameters
valueThe integer value.
Return Value
The integer expression.
-
Creates a 64-bit integer expression.
Declaration
Swift
public static func int64(_ value: Int64) -> ExpressionProtocolParameters
valueThe 64-bit integer value.
Return Value
The 64-bit integer expression.
-
Creates a float expression.
Declaration
Swift
public static func float(_ value: Float) -> ExpressionProtocolParameters
valueThe float value.
Return Value
The float expression.
-
Creates a double expression.
Declaration
Swift
public static func double(_ value: Double) -> ExpressionProtocolParameters
valueThe double value.
Return Value
The double expression.
-
Creates a boolean expression.
Declaration
Swift
public static func boolean(_ value: Bool) -> ExpressionProtocolParameters
valueThe boolean value.
Return Value
The boolean expression.
-
Creates a date expression.
Declaration
Swift
public static func date(_ value: Date?) -> ExpressionProtocolParameters
valueThe date value.
Return Value
The date expression.
-
Creates a dictionary expression. The supported value types are String, NSNumber, int, int64, float, double, boolean, Date, null and ExpressionProtocol.
Declaration
Swift
public static func dictionary(_ value: Dictionary<String, Any>?) -> ExpressionProtocolParameters
valueThe dictionary value.
Return Value
The dictionary expression.
-
Creates an array expression. The supported value types are String, NSNumber, int, int64, float, double, boolean, Date, null and ExpressionProtocol.
Declaration
Swift
public static func array(_ value: Array<Any>?) -> ExpressionProtocolParameters
valueThe array value.
Return Value
The array expression.
-
Creates a parameter expression with the given parameter name.
Declaration
Swift
public static func parameter(_ name: String) -> ExpressionProtocolParameters
nameThe parameter name
Return Value
A parameter expression.
-
Creates a negated expression representing the negated result of the given expression.
Declaration
Swift
public static func negated(_ expression: ExpressionProtocol) -> ExpressionProtocolParameters
expressionThe expression to be negated.
Return Value
A negated expression.
-
Creates a negated expression representing the negated result of the given expression.
If the operand isn’t a boolean type, it gets coerced to a boolean. The number 0 is coerced to false, the number 1 is coerced to
true, strings are coerced tofalse(but strings prefixed with a number are coerced totrue, for example “2willowroad@nationaltrust.org.uk”).Declaration
Swift
public static func not(_ expression: ExpressionProtocol) -> ExpressionProtocolParameters
expressionThe expression to be negated.
Return Value
A negated expression
-
Create a full-text index expression referencing a full-text index with the given index name.
When there is a need to specify the data source in which the index has been created (e.g. in multi-collection join statement, calls the from(_ alias: String) method from the returned FullTextIndexExpressionProtocol object to specify the data source.
Declaration
Swift
public static func fullTextIndex(_ name: String) -> FullTextIndexExpressionProtocolParameters
indexNameThe name of the full-text index.
Return Value
The full-text index expression referring to a full text index in the specified data source.
Expression Class Reference