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
c007c04afb
commit
52ffb4a02c
1 file changed
+3
-3
@@ -1061,10 +1061,10 @@ See how the `Book.author` has been joined or included, on each step, independent
|
||||
```swift
|
||||
extension QueryInterfaceRequest where T == Book {
|
||||
func filter(authorCountryCode: String) -> QueryInterfaceRequest<Book> {
|
||||
return joining(required: Book.author
|
||||
.filter(Column("countryCode") == countryCode))
|
||||
let filteredAuthor = Book.author.filter(Column("countryCode") == countryCode)
|
||||
return joining(required: filteredAuthor)
|
||||
}
|
||||
|
||||
|
||||
func orderedByAuthorNameAndTitle() -> QueryInterfaceRequest<Book> {
|
||||
let authorAlias = TableAlias()
|
||||
return joining(optional: Book.author.aliased(authorAlias))
|
||||
|
||||
Reference in new issue
Block a user