ultra_batch/lib.rs
1//! Batch and cache database queries, mutations, or other potentially expensive
2//! operations. The main motivation for this library is to solve the "N + 1"
3//! query problem seen in GraphQL and elsewhere. This library takes heavy
4//! influence from the GraphQL Foundation's [DataLoader](https://github.com/graphql/dataloader).
5//!
6//! For batched data queries, see the [`BatchFetcher`] type (used to queue and
7//! load data in batches) and the [`Fetcher`] trait (used by [`BatchFetcher`]s
8//! to actually retrieve the data). For other operations including mutations
9//! or more advanced query operations, see the [`BatchExecutor`] type and
10//! the [`Executor`] trait.
11
12pub(crate) mod batch_executor;
13pub(crate) mod batch_fetcher;
14pub(crate) mod cache;
15pub(crate) mod executor;
16pub(crate) mod fetcher;
17
18pub use batch_executor::{BatchExecutor, BatchExecutorBuilder, ExecuteError};
19pub use batch_fetcher::{BatchFetcher, BatchFetcherBuilder, LoadError};
20pub use cache::Cache;
21pub use executor::Executor;
22pub use fetcher::Fetcher;