Git Product home page Git Product logo

librethinkdbxx's Introduction

RethinkDB driver for C++

This driver is compatible with RethinkDB 2.0. It is based on the official RethinkDB Python driver.

Example

#include <memory>
#include <cstdio>
#include <rethinkdb.h>

namespace R = RethinkDB;

int main() {
  std::unique_ptr<R::Connection> conn = R::connect("localhost", 28015);
  R::Cursor cursor = R::table("users").filter(R::row["age"] > 14).run(*conn);
  for (R::Datum& user : cursor) {
      printf("%s\n", user.as_json().c_str());
  }
}

Build

Requires a modern C++ compiler. to build and install, run:

make
make install

Will build include/rethinkdb.h, librethinkdb++.a and librethinkdb++.so into the build/ directory.

To include documentation from the Python driver in the header file, pass the following argument to make.

make INCLUDE_PYTHON_DOCS=yes

To build in debug mode:

make DEBUG=yes

To install to a specific location:

make install prefix=/usr/local DESTDIR=

Status

Still in early stages of development.

Tests

This driver is tested against the upstream ReQL tests from the RethinkDB repo, which are programmatically translated from Python to C++. As of 34dc13c, all tests pass:

$ make test
...
SUCCESS: 2053 tests passed

librethinkdbxx's People

Contributors

atnnn avatar mbroadst avatar adamierymenko avatar lbguilherme avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.