AggregateFunction
public enum AggregateFunction
An enumeration of the supported aggregate functions that can applied on a column.
-
The SQL AVG function.
Declaration
Swift
case avg(field: Field)
-
The SQL MAX function.
Declaration
Swift
case max(field: Field)
-
The SQL MIN function.
Declaration
Swift
case min(field: Field)
-
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)
-
The SQL MID function.
Declaration
Swift
case mid(field: Field, start: Int, length: Int)
-
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.