SQLCollatedExpression
public struct SQLCollatedExpression
SQLCollatedExpression taints an expression so that every derived expression is eventually evaluated using an SQLite collation.
You create one by calling the SQLSpecificExpressible.collating() method.
let email: SQLCollatedExpression = Column("email").collating(.nocase)
// SELECT * FROM players WHERE email = 'arthur@example.com' COLLATE NOCASE
Players.filter(email == "arthur@example.com")
-
The tainted expression
Declaration
Swift
public let expression: SQLExpression
-
The name of the collation
Declaration
Swift
public let collationName: Database.CollationName
-
Returns an ordering suitable for QueryInterfaceRequest.order()
let email: SQLCollatedExpression = Column("email").collating(.nocase) // SELECT * FROM players ORDER BY email COLLATE NOCASE ASC Players.order(email.asc)
See https://github.com/groue/GRDB.swift/#the-query-interface
Declaration
Swift
public var asc: SQLOrderingTerm
-
Returns an ordering suitable for QueryInterfaceRequest.order()
let email: SQLCollatedExpression = Column("email").collating(.nocase) // SELECT * FROM players ORDER BY email COLLATE NOCASE DESC Players.order(email.desc)
See https://github.com/groue/GRDB.swift/#the-query-interface
Declaration
Swift
public var desc: SQLOrderingTerm