protocols.dao.FindResult
An async-iterable result from find_all() that also exposes pagination metadata.
Usage
protocols.dao.FindResult()The total_count() method performs an additional count query on first call (lazily) and caches the result for subsequent calls.
Methods
| Name | Description |
|---|---|
| to_list() | Collect all results into a list. |
| total_count() | Total number of matching documents, ignoring skip and limit. |
to_list()
Collect all results into a list.
Usage
to_list()Calling this function will consume the iterator. Subsequent cals will return an empty list.
total_count()
Total number of matching documents, ignoring skip and limit.
Usage
total_count()The result is cached after the first call.