Documentation

This commit is contained in:
Gwendal Roué committed 2016-03-11 09:04:14 +01:00
1 parent fadfa11ea1
commit 67afe993a7
1 file changed
+4 -5
+4 -5
View File
@@ -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)
}
```