unreql 0.1.4

Well documented and easy to use RethinkDB Rust Driver
Documentation

Unofficial RethinkDB Driver for Rust

Well documented and easy to use

Motivation

The official driver is difficult to support, awkward to use, and has little to no documentation or examples. Therefore, an attempt was made by me to remedy these shortcomings

Install

$ cargo add unreql

or

[dependencies]
unreql = "0.1.3"

Import

use unreql::r;

Connect

let conn = r.connect(()).await?;

Get data

let query = r.table("users").get(1).run(&conn);
let user: Option<User> = query.try_next().await?;

Update data

Use a nested reql query

r.table("users")
  .get(1)
  .update(rjson!({
    "name": "John",
    "upd_count": r.row().g("upd_count").add(1),
  }))
  .run(&conn);