mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
SelectionRequest.annotated(with:)
This commit is contained in:
1 parent
e163b91cf0
commit
a4a26e01e7
5 files changed
+95
-2
No files matched your search
@@ -513,6 +513,26 @@ extension TableRecord {
|
||||
return all().select(literal: sqlLiteral, as: type)
|
||||
}
|
||||
|
||||
/// Creates a request which appends *selection*.
|
||||
///
|
||||
/// // SELECT id, email, name FROM player
|
||||
/// le request = Player
|
||||
/// .select([Column("id"), Column("email")])
|
||||
/// .annotated(with: [Column("name")])
|
||||
public static func annotated(with selection: [SQLSelectable]) -> QueryInterfaceRequest<Self> {
|
||||
return all().annotated(with: selection)
|
||||
}
|
||||
|
||||
/// Creates a request which appends *selection*.
|
||||
///
|
||||
/// // SELECT id, email, name FROM player
|
||||
/// le request = Player
|
||||
/// .select([Column("id"), Column("email")])
|
||||
/// .annotated(with: Column("name"))
|
||||
public static func annotated(with selection: SQLSelectable...) -> QueryInterfaceRequest<Self> {
|
||||
return all().annotated(with: selection)
|
||||
}
|
||||
|
||||
/// Creates a request with the provided *predicate*.
|
||||
///
|
||||
/// // SELECT * FROM player WHERE email = 'arthur@example.com'
|
||||
|
||||
Reference in new issue
Block a user