ADSQLExpression

public protocol ADSQLExpression

Holds information about a expression parsed from a SQL instruction.

  • Decodes the expression from an Instance Dictionary that has been read from a Swift Portable Object Notation (SPON) stream.

    Declaration

    Swift

    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 func evaluate(forRecord record: ADRecord?) throws -> Any?

    Parameters

    record

    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

    func encode() -> ADInstanceDictionary
  • Decodes the expression from an Instance Dictionary that has been read from a Swift Portable Object Notation (SPON) stream.

    Declaration

    Swift

    func decode(fromInstance dictionary: ADInstanceDictionary)

    Parameters

    dictionary

    A ADInstanceDictionary representing the values for the expression.