#rethink-db #driver #api #protocols #json #table #run

nightly rust-rethinkdb

Rust native driver for RethinkDB 2.0. WIP.

1 unstable release

Uses old Rust 2015

0.0.1 Apr 19, 2015

#8 in #rethink-db

MIT license

56KB
1.5K SLoC

Shell 1K SLoC // 0.1% comments Rust 588 SLoC // 0.0% comments

RethinkDB 2.0 Rust Driver

This is a very early stage WIP driver for json protocol. Compatible with Rust beta.

Example

  use rethinkdb::RethinkDB;
  use rethinkdb::api::*;

	  let mut rethinkdb = RethinkDB::connect("localhost", 7888, "AUTH", 3); // 3 connections in the pool 
    let tc = db("test").table_create("person").replicas(1i32).run(&mut rethinkdb);

    struct Person {
    	name : String,
    	age  : u32,
    }
    let nacho = Person{name : "nacho".to_string(), age : 6};

    db("test").table("person").insert(json::encode(nacho)).run(&mut rethinkdb);


Messages implemented

  • DB
  • TABLE_CREATE
  • TABLE
  • TABLE_DROP

Contributing

By now it is just a PR with the project bein able to build.

Licence

MIT

Dependencies

~345KB