CommonTableExpression
A common table expression that can be used with the GRDB query interface.
struct CommonTableExpression<RowDecoder>
A common table expression that can be used with the GRDB query interface.
struct CommonTableExpression<RowDecoder>
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct QueryInterfaceRequest<RowDecoder>
A request that builds SQL queries with Swift.
struct Table<RowDecoder>
A Table
builds database queries with the Swift language instead of SQL.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, literal sqlLiteral: SQL)
Creates a common table expression from an SQL literal.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, request: some SQLSubqueryable)
Creates a common table expression from a request.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, sql: String, arguments: StatementArguments = StatementArguments())
Creates a common table expression from an SQL string and optional arguments.
var tableName: String { get }
The table name of the common table expression.
func all() -> QueryInterfaceRequest<RowDecoder>
Creates a request for all rows of the common table expression.
func association<Destination>(to destination: Table<Destination>) -> JoinAssociation<RowDecoder, Destination>
Creates an association to a table that you can join or include in another request.
func association<Destination>(to cte: CommonTableExpression<Destination>) -> JoinAssociation<RowDecoder, Destination>
Creates an association to a common table expression that you can join or include in another request.
func association<Destination>(to destination: Destination.Type) -> JoinAssociation<RowDecoder, Destination> where Destination : TableRecord
Creates an association to a table record that you can join or include in another request.
func association<Destination>(to destination: Table<Destination>, on condition: @escaping (_ left: TableAlias, _ right: TableAlias) -> any SQLExpressible) -> JoinAssociation<RowDecoder, Destination>
Creates an association to a table that you can join or include in another request.
func association<Destination>(to cte: CommonTableExpression<Destination>, on condition: @escaping (_ left: TableAlias, _ right: TableAlias) -> any SQLExpressible) -> JoinAssociation<RowDecoder, Destination>
Creates an association to a common table expression that you can join or include in another request.
func association<Destination>(to destination: Destination.Type, on condition: @escaping (_ left: TableAlias, _ right: TableAlias) -> any SQLExpressible) -> JoinAssociation<RowDecoder, Destination> where Destination : TableRecord
Creates an association to a table record that you can join or include in another request.
func contains(_ element: some SQLExpressible) -> SQLExpression
An SQL expression that checks the inclusion of an expression in a common table expression.
final class Row
A database row.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, literal sqlLiteral: SQL)
Creates a common table expression from an SQL literal.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, request: some SQLSubqueryable)
Creates a common table expression from a request.
init(recursive: Bool = false, named tableName: String, columns: [String]? = nil, sql: String, arguments: StatementArguments = StatementArguments())
Creates a common table expression from an SQL string and optional arguments.