jungles-data-postgres

Data for Jungles using Postgresql

npm install jungles-data-postgres
3 downloads in the last week
39 downloads in the last month

Jungles Data Postgres (Out of date)

Setup

var data = require('jungles-data-postgres')({
  user: 'james',
  password: '1234',
  database: 'jungles',
  host: '127.0.0.1'
});

data.setup(); // Creates table called instances

API

Data API

Postgres specific

Query objects get translated.

{ id: 5}               // SELECT * FROM instances where id = 5;
{ path: /.*/ }         // SELECT * FROM instance WHERE path ~ .*;
{ path: /.*/, id: 5 }  // SELECT * FROM instances WHERE path ~ .* and id = 5;

Test

mocha.js and should.js is needed. Tests are run against a real database which your can start with vagrant up.

make test
npm loves you