Go to file
2010-10-23 00:52:16 -05:00
lib renamed Client#disconnect to Client#end 2010-10-22 18:28:10 -05:00
script only list built-in db types 2010-10-17 22:25:05 -05:00
test minor code cleanup in test helper 2010-10-23 00:52:16 -05:00
.gitignore initial commit 2010-09-28 22:09:21 -05:00
README.md renamed Client#disconnect to Client#end 2010-10-22 18:28:10 -05:00
test-units.js made script to execute all unit tests 2010-10-10 18:50:05 -05:00

#pg.js Async Pure JavaScript PostgreSQL driver for node.js

ALPHA version

Implemented in a fully TDD fashion. Drew major inspiration from postgres-js but it has 0 tests and doesn't seem to be actively developed anymore. I'm aiming for extremely high quality code, but first doing the implementation and only refactoring after tests are in place.

I'm first aiming to support the low level messaging protocol.

Due to the fully async nature of node sockets, the driver is completely non-blocking.

What works?

var client = new Client({
  username: 'brianc',
  database: 'postgres'
});

client.connect();

client.query('select typname, oid from pg_type');

query.on('row', function(row) {
  console.log('type name: ' + row[0] + ' oid: ' + row[1]);      
};

query.on('end') {
  client.end();
};

TODO

  • prepared statements
    • parameters
    • caching
  • integration testing
  • notification api
  • setting parameters
  • stored procedures
  • connection pooling
  • copy data
  • connection pooling