acid.js
A simple postgres library
Install
$ npm install --save acidjs
Examples
// Require the modulevar acid = "postgres://postgres:@localhost:5432/database";
Create a table
$ psql -c "create table users (id bigserial primary key, email text not null, created_at timestamp without time zone default (now() at time zone "utc"));"
Insert a record
var tables = users: "users"; acid;;
Find a record with a where clause
acid;
Update a record
acid
Delete a record
acid;
Run arbitrary sql
acid
Tests
# Set up the database $ psql -c "create user postgres createdb;"$ psql -c "create database postgres;"$ psql -c "create database acidjs;" -U postgres$ npm test