ADSQLWhenExpression
public class ADSQLWhenExpression: ADSQLExpression
Defines a when clause using in a CASE clause in a SQL instruction.
-
The value used to trigger the expression.
Declaration
Swift
public var whenValue: ADSQLExpression
-
The value returned when triggered.
Declaration
Swift
public var thenValue: ADSQLExpression
-
Undocumented
Declaration
Swift
public class ADSQLWhenExpression: ADSQLExpression
-
Decodes the expression from an Instance Dictionary that has been read from a Swift Portable Object Notation (SPON) stream.
Declaration
Swift
public required init(fromInstance dictionary: ADInstanceDictionary)
Parameters
dictionary
A
ADInstanceDictionary
representing the values for the expression.
-
Evaluates the given expression and returns a result based on the data in the record passed in.
Declaration
Swift
@discardableResult public func evaluate(forRecord row: ADRecord? = nil) throws -> Any?
Parameters
row
A
ADRecord
containing values to be evaluated against the expression.Return Value
The result of the evaluation.
-
Encodes the expression into an Instance Dictionary for storage in a Swift Portable Object Notation (SPON) format. -Returns: The expression represented as an Instance Dictionary.
Declaration
Swift
public func encode() -> ADInstanceDictionary
-
Decodes the expression from an Instance Dictionary that has been read from a Swift Portable Object Notation (SPON) stream.
Declaration
Swift
public func decode(fromInstance dictionary: ADInstanceDictionary)
Parameters
dictionary
A
ADInstanceDictionary
representing the values for the expression.