This commit is contained in:
Gwendal Roué committed 2020-05-01 10:59:10 +02:00
1 parent 4de63ca9a2
commit ee68550052
1 file changed
+2 -2
+2 -2
View File
@@ -249,12 +249,12 @@ Let's extend Player with database methods.
```swift
extension Player: Decodable, FetchableRecord, TableRecord {
/// "Simple" version
static func filter(id: Int64) -> SQLRequest<Player> {
static func filter(ids: [Int64]) -> SQLRequest<Player> {
"SELECT * FROM player WHERE id IN \(ids)"
}
/// "Future-proof" version
static func filter(id: Int64) -> SQLRequest<Player> {
static func filter(ids: [Int64]) -> SQLRequest<Player> {
"""
SELECT \(columnsOf: self)
FROM \(self)