ultra-batch
ultra-batch
is a Rust library to 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. It's designed primarily for dealing with database queries, but it can be used to batch any potentially expensive data loading operations.
Example Use
First, add tokio
, async-trait
, and anyhow
(optional) as dependencies.
use async_trait;
use ;
async
Alternative projects
License
Licensed under either the MIT license or Apache 2.0 license (licensee's choice).