reql 0.11.2

A native ReQL driver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use futures::TryStreamExt;
use reql::{func, r};
use serde_json::Value;

#[tokio::test]
async fn do_query() -> reql::Result<()> {
    tracing_subscriber::fmt::init();
    let conn = r.connect(()).await?;
    let mut query = r.do_(r.args(([10, 20], func!(|x, y| x + y)))).run(&conn);
    let val: Option<Value> = query.try_next().await?;
    assert!(val.is_some());
    Ok(())
}