Skip to content

aguspiza/rethinkdb.nim

 
 

Repository files navigation

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), 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()
r.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()
r.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

About

RethinkDB driver for Nim

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Nim 100.0%