Go to file
2010-10-23 23:12:02 -05:00
lib renamed 'message' to 'payload' 2010-10-23 22:45:03 -05:00
script only list built-in db types 2010-10-17 22:25:05 -05:00
test integration test for notifications 2010-10-23 23:12:02 -05:00
.gitignore ignore project file 2010-10-23 17:08:51 -05:00
README.md readme update 2010-10-23 22:19:30 -05:00
test.js test refactoring 2010-10-23 22:07:00 -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. Jump for joy!

Connection

The connection object is a 1 to 1 mapping to the messaging protocol. It is mostly used by the Client object (which...I haven't yet implemented) but you can do anything you want with PostgreSQL using the connection object if you're really into that. I studied the protocol for a while implementing this and the documentation is pretty solid. The connection only supports 'text' mode right now.

Client

Basically a facade on top of the connection to provide a much more user friendly, "node style" interface for doing all the lovely things you like with PostgreSQL.

TODO

  • prepared statements
    • parameters
    • caching
  • integration testing
  • notifications
  • setting parameters
  • connection pooling
  • copy data
  • connection pooling