AggregateFunction

public enum AggregateFunction

An enumeration of the supported aggregate functions that can applied on a column.

  • avg

    The SQL AVG function.

    Declaration

    Swift

    case avg(field: Field)
  • max

    The SQL MAX function.

    Declaration

    Swift

    case max(field: Field)
  • min

    The SQL MIN function.

    Declaration

    Swift

    case min(field: Field)
  • sum

    The SQL SUM function.

    Declaration

    Swift

    case sum(field: Field)
  • The SQL LAST function.

    Declaration

    Swift

    case last(field: Field)
  • The SQL FIRST function.

    Declaration

    Swift

    case first(field: Field)
  • The SQL COUNT function.

    Declaration

    Swift

    case count(field: Field)
  • The SQL COUNT DISTINCT function.

    Declaration

    Swift

    case countDistinct(field: Field)
  • The SQL UCASE function.

    Declaration

    Swift

    case ucase(field: Field)
  • The SQL LCASE function.

    Declaration

    Swift

    case lcase(field: Field)
  • The SQL ROUND function.

    Declaration

    Swift

    case round(field: Field, to: Int)
  • mid

    The SQL MID function.

    Declaration

    Swift

    case mid(field: Field, start: Int, length: Int)
  • len

    The SQL LEN function.

    Declaration

    Swift

    case len(field: Field)
  • Build the query component using QueryBuilder.

    Throws

    QueryError.syntaxError if query build fails.

    Declaration

    Swift

    public func build(queryBuilder: QueryBuilder) throws -> String

    Parameters

    queryBuilder

    The QueryBuilder to use.

    Return Value

    A String representation of the query component.