Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lmangani/rethinkdb-bulk
Queue & Bulk Operations for RethinkDB, and a name that stutters
https://github.com/lmangani/rethinkdb-bulk
bulk insert nosql queue rethink rethinkdb
Last synced: 13 days ago
JSON representation
Queue & Bulk Operations for RethinkDB, and a name that stutters
- Host: GitHub
- URL: https://github.com/lmangani/rethinkdb-bulk
- Owner: lmangani
- License: mit
- Created: 2018-02-17T12:53:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-17T21:58:35.000Z (almost 7 years ago)
- Last Synced: 2024-05-01T21:29:36.029Z (8 months ago)
- Topics: bulk, insert, nosql, queue, rethink, rethinkdb
- Language: JavaScript
- Homepage: http://qxip.net
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RethinkDB-Bulk
Simple Bulk Operations for [RethinkDB](https://github.com/rethinkdb/rethinkdb)## About
This simple module wraps a RethinkDB Client and Bulk/Queue Handler, automatically handling Database and Table creation and rotation using `static`, `daily` or `monthly` partitions.### Usage
#### Install
```
npm install rethinkdb-bulk
```#### Init
The following configuration will create a Bulk Queue connected to RethinkDB _(node or cluster)_
```
const rethinkDBulk = require('rethinkdb-bulk').getBucket({
config: {
"servers": [
{ "host": "127.0.0.1", "port": 28015 }
}
},
dbName: 'myIndex',
tableName: 'myTable',
indexType: 'daily',
bulk_timeout: 5000,
bulk_maxSize: 1000,
bulk_useInterval: true
});
```#### Client
```
rethinkDBulk.push({ name: 'random1', value: 1111, created: new Date().toISOString() });
rethinkDBulk.push({ name: 'random2', value: 2222, created: new Date().toISOString() });
rethinkDBulk.push({ name: 'random3', value: 3333, created: new Date().toISOString() });
```