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
445ec18d6e
commit
8a983274af
1 file changed
+1
@@ -1421,6 +1421,7 @@ For example, you'll use the `isEmpty` aggregate when you want, say, to fetch all
|
||||
|
||||
```swift
|
||||
let lazyAuthors: [Author] = try Author.having(Author.books.isEmpty).fetchAll(db)
|
||||
let productiveAuthors: [Author] = try Author.having(!Author.books.isEmpty).fetchAll(db)
|
||||
```
|
||||
|
||||
And you'll use the `count` aggregate in order to fetch all authors along with the number of books they wrote:
|
||||
|
||||
Reference in new issue
Block a user