reql 0.0.6-alpha5

A native RethinkDB driver
Documentation

RethinkDB Driver

This is a RethinkDB driver written in Rust.

Build Status Latest Version Docs

Note: While this driver is already usable in the current state, the API is not yet stable and many commands are not yet implemented. I recommend you pin to specific versions if you have to code against it. Also kindly submit an issue or pull request if the command you want is missing.

Getting Started

Add this crate to your dependencies section:-

[dependencies]
reql = "0.0.6-alpha5"

Import it in your main.rs or lib.rs:-

#[macro_use]
extern crate reql;

Run ReQL commands:-

#[macro_use] extern crate reql;
#[macro_use] extern crate slog;
extern crate slog_term;

use slog::DrainExt;
use reql::commands::{Command, Db, Table};

fn main() {
    // Build an output drain
    let drain = slog_term::streamer().async().compact().build();

    // Setup a logger
    let logger = slog::Logger::root(drain.fuse(), o!());

    // Create a new ReQL client with the logger
    let r = Command::new().with_logger(logger);

    // Run a command
    let _heroes = r.db("heroes").table(args!("marvel", {read_mode: "outdated"}));
}

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.