Skip to content
Browse files

updated readme & package for new version

  • Loading branch information...
1 parent 9990ddd commit f815c990c326b12ef6075598c6d3fa38339be2e4 @brianc committed Mar 11, 2011
Showing with 15 additions and 10 deletions.
  1. +4 −4 README.md
  2. +3 −1 lib/index.js
  3. +8 −5 package.json
View
8 README.md
@@ -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
4 lib/index.js
@@ -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
13 package.json
@@ -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" }
}

0 comments on commit f815c99

Please sign in to comment.
Something went wrong with that request. Please try again.