Field

public protocol Field : Buildable

Defines the protocol for columns, and aggregate and scalar functions on columns.

  • The alias of the field.

    Declaration

    Swift

    var alias: String? { get set }
  • as(_:) Default implementation

    Add an alias to the field, i.e., implement the SQL AS operator.

    Default Implementation

    Add an alias to the field, i.e., implement the SQL AS operator.

    Declaration

    Swift

    func `as`(_ newName: String) -> Field

    Parameters

    newName

    A String containing the alias for the field.

    Return Value

    A new Field instance with the alias.