You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-14Lines changed: 17 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,6 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
8
8
9
9
## Examples
10
10
11
-
All examples will work with the pure javascript bindings (currently default) or the libpq native (c/c++) bindings (currently in beta)
12
-
13
-
To use native libpq bindings replace `require('pg')` with `require('pg').native`.
14
-
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.
16
-
17
-
node-postgres supports both an 'event emitter' style API and a 'callback' style. The callback style is more concise and generally preferred, but the evented API can come in handy. They can be mixed and matched. The only events which do __not__ fire when callbacks are supplied are the `error` events, as they are to be handled by the callback function.
18
-
19
11
### Simple, using built-in client pool
20
12
21
13
var pg = require('pg');
@@ -73,9 +65,19 @@ node-postgres supports both an 'event emitter' style API and a 'callback' style.
73
65
client.end();
74
66
});
75
67
68
+
### Example notes
69
+
70
+
node-postgres supports both an 'event emitter' style API and a 'callback' style. The callback style is more concise and generally preferred, but the evented API can come in handy. They can be mixed and matched. The only events which do __not__ fire when callbacks are supplied are the `error` events, as they are to be handled by the callback function.
71
+
72
+
All examples will work with the pure javascript bindings (currently default) or the libpq native (c/c++) bindings (currently in beta)
73
+
74
+
To use native libpq bindings replace `require('pg')` with `require('pg').native`.
75
+
76
+
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.
77
+
76
78
### Info
77
79
78
-
*a pure javascript client and native libpq bindings with_the same api_
80
+
* pure javascript client and native libpq bindings share_the same api_
79
81
*_heavily_ tested
80
82
* the same suite of 200+ integration tests passed by both javascript & libpq bindings
81
83
* benchmark & long-running memory leak tests performed before releases
@@ -84,7 +86,7 @@ node-postgres supports both an 'event emitter' style API and a 'callback' style.
84
86
* Linux, OS X
85
87
* node 2.x & 4.x
86
88
* row-by-row result streaming
87
-
*optional, built-in connection pooling
89
+
* built-in (optional) connection pooling
88
90
* responsive project maintainer
89
91
* supported PostgreSQL features
90
92
* parameterized queries
@@ -94,9 +96,7 @@ node-postgres supports both an 'event emitter' style API and a 'callback' style.
94
96
* query queue
95
97
* active development
96
98
* fast
97
-
* No dependencies (other than PostgreSQL)
98
-
* No monkey patching
99
-
* Tried to mirror the node-mysql api as much as possible for future multi-database-supported ORM implementation ease
99
+
* close mirror of the node-mysql api for future multi-database-supported ORM implementation ease
100
100
101
101
### Contributors
102
102
@@ -110,15 +110,18 @@ Many thanks to the following:
110
110
*[ef4](https://github.com/ef4)
111
111
*[napa3um](https://github.com/napa3um)
112
112
*[drdaeman](https://github.com/drdaeman)
113
+
*[booo](https://github.com/booo)
113
114
114
115
## Documentation
115
116
116
-
Still a work in progress, I am trying to flesh out the wiki...
117
+
Documentation is a work in progress primarily taking place on the github WIKI
0 commit comments