node-postgres/README.md

44 lines
1.4 KiB
Markdown
Raw Normal View History

2010-10-16 07:21:24 +08:00
#pg.js
2010-10-23 07:26:18 +08:00
Async Pure JavaScript PostgreSQL driver for node.js
2010-10-16 07:21:24 +08:00
2010-10-17 08:45:05 +08:00
## ALPHA version
2010-10-16 07:21:24 +08:00
2010-10-23 07:26:18 +08:00
Implemented in a fully TDD fashion. Drew major inspiration from
[postgres-js](http://github.com/creationix/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](http://developer.postgresql.org/pgdocs/postgres/protocol.html).
Due to the fully async nature of node sockets, the driver is
2010-10-24 11:19:30 +08:00
completely non-blocking. Jump for joy!
2010-10-17 08:45:05 +08:00
2010-10-24 11:19:30 +08:00
### Connection
2010-10-17 08:45:05 +08:00
2010-10-24 11:19:30 +08:00
The connection object is a 1 to 1 mapping to the [messaging
protocol](http://developer.postgresql.org/pgdocs/postgres/protocol.html).
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.
2010-09-29 11:09:21 +08:00
2010-10-24 11:19:30 +08:00
### Client
2010-10-23 07:26:18 +08:00
2010-10-24 11:19:30 +08:00
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.
2010-10-23 07:26:18 +08:00
## TODO
- prepared statements
- parameters
- caching
- integration testing
2010-10-24 11:19:30 +08:00
- notifications
2010-10-23 07:26:18 +08:00
- setting parameters
- connection pooling
- copy data
- connection pooling