0.2.2 • Published 10 years ago

pg-simple v0.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

pg-simple

###A simpler interface to node-postgres

Don't worry anymore about this type of thing:

pg.connect(connString, function(err, client, done) {
	if(err) throw err;
	client.query(query, values, function(err, result) {
		if(err) throw err;
		// Do things with result
	})
})

With pg-simple, you can now just do:

pg.connect(connString); // You have to do this just once, as it will be stored by pg-simple
pg.error(function(err) { // Define a handler for any error that might occur. Also just once.
	throw err;
})
pg.query(query, values, function(err, result) {
	// No error handler, as we have defined one with pg.error()
	// Note that an error may be passed, when no handler has been set with pg.error())
	// Do things with result
})
0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago