0.2.4 • Published 7 years ago

denali-rethinkdb v0.2.4

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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
0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago