denali-rethinkdb

0.2.4 • Public • Published

denali-rethinkdb

Allows use of RethinkDB as a store for your models.

Installation

  1. Install this package (denali install denali-rethinkdb)
  2. Add a app/orm-adapters/application.js that extends this adapter.
import RethinkdbAdapter from 'denali-rethinkdb/app/orm-adapters/rethinkdb';
 
export default RethinkdbAdapter;
  1. Make sure your models (if any) have their attributes defined with the attributes that this adapter defines.

Configuration

The configuration can be updated in config/environment.js.

It would look something like:

config.database = {
  config: {
    host: 'localhost',
    port: 28015,
    db: 'test'
  },
  autoCreateTables: true
};

Opinions

Currently, this adapter converts model names into plural table names.

export default class Issue extends Model {
 
  static createdAt = attr('date'); // maps to the issued table and createdAt column
 
}

Developing

  1. Clone the repo down
  2. npm install
  3. denali server
  4. Hit localhost:3000

Tests

$ denali test

Package Sidebar

Install

npm i denali-rethinkdb

Weekly Downloads

0

Version

0.2.4

License

MIT

Last publish

Collaborators

  • knownasilya