Crate ultra_batchsource · [−]
Batch and cache database queries or other potentially expensive data lookups. The main motivation for this library is to solve the “N + 1” query problem seen in GraphQL and elsewhere. This library takes heavy influence from the GraphQL Foundation’s DataLoader.
The most common entrypoints to this library are the
Batcher type (used
to queue and load data in batches) and the
Fetcher trait (used by
Batchers to actually retrieve the data).
Used to batch and cache loads from some datastore. A
Batcher can be used
with any type that implements
Batchers are asynchronous, and
designed to be passed and shared between threads or tasks. Cloning a
Batcher is shallow and can be used to use the same
multiple threads or tasks.
Used to configure a new
BatcherBuilder is returned from