ADSQLBinaryExpression

public class ADSQLBinaryExpression: ADSQLExpression

Defines a binary operation being performed on two expressions in a SQL instruction such as adding two values or comparing two values to see if they are equal.

  • Defines the type of binary operation being performed.

    See more

    Declaration

    Swift

    public enum BinaryOperation: String
  • The left side of the binary expression.

    Declaration

    Swift

    public var leftValue: ADSQLExpression
  • The operation to perform on both values.

    Declaration

    Swift

    public var operation: BinaryOperation
  • The right side of the binary expression.

    Declaration

    Swift

    public var rightValue: ADSQLExpression?
  • If true, negate a binary value result, else false.

    Declaration

    Swift

    public var negate = false
  • 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.