1 unstable release

0.1.2 Jul 4, 2020

#18 in #arango-db


Used in arangoq

MIT/Apache

19KB
355 lines

arangoq

A quick arangodb query builder layer for rust.

Arangoq in action

   let url = || mockito::server_url();
   let conn = ArangoConnection::new(url(), "test_db".to_string(), Client::default());

   #[derive(ArangoBuilder, Serialize)]
   pub struct Person {
      name: &'static str,
      age: u8,
   }

   let collection_name = "People";
   let query = Person::query_builder(collection_name)
      .read()
      .filter()
      .name_eq(&"John Lennon")
      .or()
      .name_eq(&"George Harrison")
      .and()
      .age_gt(&42)
      .limit(10)
      .build();

   query.try_exec::<Person>(&conn).await;

Similar crates

arangors born roughly at the same time as arangoq with a focus on becoming similar to the Python package. arangoq provides a different funcionality set: a more Rust like, high level query builder experience. It was designed to be more resilient to insertion attacks right from the start.

We performed several manual tests to make sure it fits our use-case. That said, as always, use at your own risk.

optional features

  • ["actors"] actix async actor implementation for queries (deprecated)

Semver

This crate is in pre semver state, breaking changes increment minor.

License

This project is licensed under either of

cargo

cargo install cargo-sort-ck

cargo-sort-ck

cargo clippy

release

cargo install cargo-release

cargo release patch

Dependencies

~2MB
~48K SLoC