js-data-rethinkdb
RethinkDB adapter for js-data.
To get started, visit http://js-data.io.
Table of contents
- Quick start
- Example App
- Guides and Tutorials
- API Reference Docs
- Community
- Support
- Contributing
- License
Quick Start
npm install --save js-data js-data-rethinkdb
.
// Use Container instead of DataStore on the server
import {Container} from 'js-data'
import RethinkDBAdapter from 'js-data-rethinkdb'
// Create a store to hold your Mappers
const store = new Container()
// Create an instance of RethinkDBAdapter with default settings
const adapter = new RethinkDBAdapter()
// Mappers in "store" will use the RethinkDB adapter by default
store.registerAdapter('rethinkdb', adapter, { default: true })
// Create a Mapper that maps to a "user" table
store.defineMapper('user')
async function findAllAdminUsers () {
// Find all users where "user.role" == "admin"
return await store.findAll('user', {
role: 'admin'
})
}
Example App
js-data-examples/server/rethinkdb
Guides and Tutorials
Get started at http://js-data.io
API Reference Docs
Community
Support
Contributing
License
The MIT License (MIT)
Copyright (c) 2014-2016 js-data-rethinkdb project authors