rethinkdown
A RethinkDB implementation of the LevelDOWN API
Tested with RethinkDB drivers
rethinkdb
rethinkdbdash
Example (ES6)
const database = 'test'const options = host: 'db.myserver.com' const table = 'mydbtable' let db = table db
API
Refer to the LevelDOWN
or AbstractLevelDOWN
documentation for full API
driver
, [database
], [connectOptions
] )
RethinkDOWN ( A RethinDOWN
instance needs to first be initialized with either a rethinkdb
or rethinkdbdash
driver, optional database name, and optional connection options
Parameters
driver
{rethinkdb
|rethinkdbdash
} - Supported RethinkDB driver- [
database="test"
] {String
} - Database name to use - [
connectOptions
] {Object
} - A rethinkdb or rethinkdbdash connect options object - [
connectOptions.singleTable
] {String
} - Single mode table name
Returns {rethinkdown
} - Instance of rethinkdown
that can be passed a location/table
Example
let rethinkdown = let db =
location
)
rethinkdown ( returns a new RethinkDOWN instance
Parameters
location
{String
} - table name or record filter when usingsingle
mode
Returns {RethinkDOWN
}
location
The location should be the name of the table that should be used as the LevelDB store. All non-alphanumeric
and _
characters will be replaced with _
since v0.3.0
Single-Mode Single mode allows the same table to be used for all level
databases. The table name specified by connectOptions.singleTable
will store all data and the location
will be added as a value in each record so that multiple databases can be stored in the same table.
Single Mode Example
let rethinkdown = let db1 = let db2 =