mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
SQLTableBuilder documentation
This commit is contained in:
1 parent
3be6b6966b
commit
2ef26e9681
1 file changed
+6
-1
@@ -2268,7 +2268,12 @@ try db.create(index: "byEmail", on: "users", columns: ["email"], unique: true)
|
||||
|
||||
### Requests
|
||||
|
||||
**The query interface requests** let you fetch values from the database.
|
||||
**The query interface requests** let you fetch values from the database:
|
||||
|
||||
```swift
|
||||
let count = Wine.filter(color == Color.Red).fetchCount(db)
|
||||
let wines = Wine.filter(origin == "Burgundy").order(price).fetchAll(db)
|
||||
```
|
||||
|
||||
All requests start from **a type** that adopts the `TableMapping` protocol, such as a `Record` subclass (see [Records](#records)):
|
||||
|
||||
|
||||
Reference in new issue
Block a user