#query-builder #edge-db #below

edgedb-query-builder

A query builder for Edgedb written in Rust

3 releases

0.1.2 Jul 31, 2022
0.1.1 Jul 31, 2022
0.1.0 Jul 31, 2022

#4 in #edgedb

MPL-2.0 license

5KB
64 lines

EdgeDB Query Builder

dont judge it too hard please....// This crate is still VERY VERY in dev. Below is a simple example of how to insert something and select it.

let new_movie_name = String::from("Ferris, a true story.");
let query = Query::new().insert("Movie", vec![(String::from("title"), new_movie_name.to_owned())]).build();

conn.query_single::<Movie2, _>(
    &query,
    &(),
).await?;

let query = Query::new().select("Movie", vec!["id", "title"]).filter(vec![(String::from("title"), new_movie_name)]).build();

let val = conn.query::<Movie, _>(
    &query,
    &(),
).await?;

View the full example here

No runtime deps