jungles-data-postgres

3.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i jungles-data-postgres

Weekly Downloads

5

Version

3.0.0

License

none

Last publish

Collaborators

  • enome