updated readme & package for new version

This commit is contained in:
brianc 2011-03-11 12:29:27 -06:00
parent 9990dddd3e
commit f815c990c3
3 changed files with 15 additions and 10 deletions

View File

@ -10,15 +10,15 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
All examples will work with the pure javascript bindings (currently default) or the libpq native (c/c++) bindings (currently in beta)
To use native libpq bindings replace `require('pg')` with `require(pg/native)`.
To use native libpq bindings replace `require('pg')` with `require('pg').native`.
The two share the same interface so __no other code changes should be required__. If you find yourself having to change code other than the require statement when switching from `pg` to `pg/native`, please report an issue.
The two share the same interface so __no other code changes should be required__. If you find yourself having to change code other than the require statement when switching from `pg` to `pg.native`, please report an issue.
### Simple, using built-in client pool
var pg = require('pg');
//or native libpq bindings
//var pg = require('pg/native')
//var pg = require('pg').native
var conString = "tcp://postgres:1234@localhost/postgres";
@ -32,7 +32,7 @@ The two share the same interface so __no other code changes should be required__
### Evented api
var pg = require('pg'); //native libpq bindings = `var pg = require('pg/native')`
var pg = require('pg'); //native libpq bindings = `var pg = require('pg').native`
var conString = "tcp://postgres:1234@localhost/postgres";
var client = new pg.Client(conString);

View File

@ -2,10 +2,12 @@ var EventEmitter = require('events').EventEmitter;
var Client = require(__dirname+'/client');
var defaults = require(__dirname + '/defaults');
var pool = require(__dirname + "/client-pool").init(Client);
module.exports = {
Client: Client,
Connection: require(__dirname + '/connection'),
connect: pool.connect,
end: pool.end,
defaults: defaults
defaults: defaults,
native: require(__dirname + '/native')
}

View File

@ -1,14 +1,17 @@
{ "name": "pg",
"version": "0.2.8",
"description": "PostgreSQL client",
"version": "0.3.0",
"description": "PostgreSQL client - pure javascript & libpq with the same API",
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
"homepage": "http://github.com/brianc/node-postgres",
"repository" : {
"type" : "git",
"url" : "git://github.com/brianc/node-postgres.git"
},
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
"main" : "./lib/index",
"directories" : { "lib" : "./lib" },
"scripts" : { "test" : "make test" },
"main" : "./lib",
"scripts" : {
"test" : "make test",
"install" : "node-waf configure build || true"
},
"engines" : { "node": ">= 0.2.2" }
}