Skip to content

Commit f815c99

Browse files
committed
updated readme & package for new version
1 parent 9990ddd commit f815c99

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
1010

1111
All examples will work with the pure javascript bindings (currently default) or the libpq native (c/c++) bindings (currently in beta)
1212

13-
To use native libpq bindings replace `require('pg')` with `require(pg/native)`.
13+
To use native libpq bindings replace `require('pg')` with `require('pg').native`.
1414

15-
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.
15+
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.
1616

1717
### Simple, using built-in client pool
1818

1919
var pg = require('pg');
2020
//or native libpq bindings
21-
//var pg = require('pg/native')
21+
//var pg = require('pg').native
2222

2323
var conString = "tcp://postgres:1234@localhost/postgres";
2424

@@ -32,7 +32,7 @@ The two share the same interface so __no other code changes should be required__
3232

3333
### Evented api
3434

35-
var pg = require('pg'); //native libpq bindings = `var pg = require('pg/native')`
35+
var pg = require('pg'); //native libpq bindings = `var pg = require('pg').native`
3636
var conString = "tcp://postgres:1234@localhost/postgres";
3737

3838
var client = new pg.Client(conString);

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ var EventEmitter = require('events').EventEmitter;
22
var Client = require(__dirname+'/client');
33
var defaults = require(__dirname + '/defaults');
44
var pool = require(__dirname + "/client-pool").init(Client);
5+
56
module.exports = {
67
Client: Client,
78
Connection: require(__dirname + '/connection'),
89
connect: pool.connect,
910
end: pool.end,
10-
defaults: defaults
11+
defaults: defaults,
12+
native: require(__dirname + '/native')
1113
}

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{ "name": "pg",
2-
"version": "0.2.8",
3-
"description": "PostgreSQL client",
2+
"version": "0.3.0",
3+
"description": "PostgreSQL client - pure javascript & libpq with the same API",
4+
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
45
"homepage": "http://github.com/brianc/node-postgres",
56
"repository" : {
67
"type" : "git",
78
"url" : "git://github.com/brianc/node-postgres.git"
89
},
910
"author" : "Brian Carlson <[email protected]>",
10-
"main" : "./lib/index",
11-
"directories" : { "lib" : "./lib" },
12-
"scripts" : { "test" : "make test" },
11+
"main" : "./lib",
12+
"scripts" : {
13+
"test" : "make test",
14+
"install" : "node-waf configure build || true"
15+
},
1316
"engines" : { "node": ">= 0.2.2" }
1417
}

0 commit comments

Comments
 (0)