mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Documentation
This commit is contained in:
1 parent
fadfa11ea1
commit
67afe993a7
1 file changed
+4
-5
@@ -440,11 +440,10 @@ You can fetch database rows, plain values, and custom models aka "records".
|
||||
**Rows** are the raw results of SQL queries:
|
||||
|
||||
```swift
|
||||
dbQueue.inDatabase { db in
|
||||
for row in Row.fetch(db, "SELECT * FROM wines") {
|
||||
let name: String = row.value(named: "name")
|
||||
let color: Color = row.value(named: "color")
|
||||
}
|
||||
for row in Row.fetchAll(dbQueue, "SELECT * FROM wines") {
|
||||
let name: String = row.value(named: "name")
|
||||
let color: Color = row.value(named: "color")
|
||||
print(name, color)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user