mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Documentation
This commit is contained in:
1 parent
a68ed01003
commit
fb7ace729c
1 file changed
+1
-3
@@ -3289,14 +3289,12 @@ let maxScore = Player // Int?
|
||||
.fetchOne(db)
|
||||
```
|
||||
|
||||
Build `SQLRequest` bound to your record types:
|
||||
Bind custom SQL requests to your record types:
|
||||
|
||||
```swift
|
||||
extension Person {
|
||||
static func someCustomRequest() -> AnyTypedRequest<Person> {
|
||||
// Some custom SQL
|
||||
let sqlRequest = SQLRequest("SELECT * FROM persons")
|
||||
// Bind the raw request to the Person type
|
||||
return sqlRequest.bound(to: Person.self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user