DatabaseFunction
A custom SQL function or aggregate.
final class DatabaseFunction
Creating a Custom SQL Function or Aggregate
init(String, argumentCount: Int?, pure: Bool, function: @escaping ([DatabaseValue]) throws -> (any DatabaseValueConvertible)?
) Creates an SQL function.
init<Aggregate>(String, argumentCount: Int?, pure: Bool, aggregate: Aggregate.Type
) Creates an SQL aggregate function.
protocol DatabaseAggregate
The protocol for custom SQLite aggregates.
Calling an SQL Function or Aggregate
func callAsFunction(any SQLExpressible...
) -> SQLExpression Returns an SQL expression that applies the function.
Built-in Functions
static let capitalize: DatabaseFunction
An SQL function that calls the Foundation
String.capitalized
property.static let localizedCapitalize: DatabaseFunction
An SQL function that calls the Foundation
String.localizedCapitalized
property.static let localizedLowercase: DatabaseFunction
An SQL function that calls the Foundation
String.localizedLowercase
property.static let localizedUppercase: DatabaseFunction
An SQL function that calls the Foundation
String.localizedUppercase
property.static let lowercase: DatabaseFunction
An SQL function that calls the Swift
String.lowercased()
method.static let uppercase: DatabaseFunction
An SQL function that calls the Swift
String.uppercased()
method.