mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
README.md
This commit is contained in:
1 parent
d6984aceb3
commit
91bb96bcb1
1 file changed
+2
-2
@@ -25,9 +25,9 @@ import GRDB
|
||||
let dbQueue = try DatabaseQueue(path: "/path/to/database.sqlite")
|
||||
|
||||
// Fetch and insert values:
|
||||
let redWinesCount = dbQueue.inDatabase { db in
|
||||
let redWinesCount = dbQueue.inDatabase { db in // Int
|
||||
db.fetchOne(Int.self, "SELECT COUNT(*) FROM wines WHERE color = ?",
|
||||
bindings: [Color.Red]) // Int?
|
||||
bindings: [Color.Red])!
|
||||
}
|
||||
|
||||
// Insert and fetch row models:
|
||||
|
||||
Reference in new issue
Block a user