ADSQLInExpression

public class ADSQLInExpression: ADSQLExpression

Defines a in expression used in a SQL instruction to see if a value is in the list of give values.

  • The value to test.

    Declaration

    Swift

    public var value: ADSQLExpression
  • The list of possible values.

    Declaration

    Swift

    public var list: [ADSQLExpression] = []
  • If true, negate the results of the test, else false.

    Declaration

    Swift

    public var negate = false
  • Creates a new In Expression instance.

    • value: The value to test.
    • list: The list of possible values.
    • negate: If true, negate the results of the test, else false

    Declaration

    Swift

    public init(value: ADSQLExpression, inList list: [ADSQLExpression], _ negate: Bool = false)
  • 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.