Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
create
schemas
update
vagrant
Makefile
README.md
Vagrantfile
copy.js
dump.js
find.js
index.js
package.json
remove.js
setup.js
tests.js
tree.js
utils.js

README.md

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
Something went wrong with that request. Please try again.