rethinkdb

RethinkDB driver for Nim


Keywords
rethinkdb, driver, client, json, async, multi-threading, nim, repl, rethinkdb-driver
License
MIT
Install
nimble install rethinkdb

Documentation

RethinkDB driver for Nim

Installation

$ nimble install rethinkdb

Accessing ReQL

r

Initiate new RethinkDB Client

import rethinkdb
var r = newRethinkclient([address = "127.0.0.1",] [port = Port(28015),] [auth = "",] [db = ""])

connect

Create a connection to database server, using infomation from RethinkClient

r.connect()

repl

Set the default connection to make REPL use easier. Allows calling .run() on queries without specifying a connection.

r.repl()
#or
r.connect().repl()

close

Close an open connetion

r.close()

reconnect

Close and reopen a connection

r.reconnect()

use

Change the defalt database on this connection

r.use(db_name)

run

Run a query on a connection, returning a JsonNode.

var r = newRethinkclient()
r.connect().repl()
r.table("test").run()

Manipulating databases

  • dbCreate
  • dbDrop
  • dbList

Manipulating tables

  • tableCreate
  • tableDrop
  • tableList
  • indexCreate
  • indexDrop
  • indexList
  • indexRename
  • indexStatus
  • indexWait
  • changes

Writing data

  • insert
  • update
  • replace
  • delete
  • sync

Selecting data

  • db
  • table
  • get
  • getAll
  • between
  • filter