Skip to content

Add sehrope/node-pg-db to Extras in README #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2014

Conversation

sehrope
Copy link
Contributor

@sehrope sehrope commented Dec 10, 2014

pg-db is a module I put together that adds a bunch of things atop node-postgres:

  • Simple interface (ex: db.query(sql, [params], function(err, rows)) or db.queryOne(sql, [params], function(err, row)))
  • Named parameter support (ex: ... WHERE foo = :foo instead of ... WHERE foo = $1)
  • Transactions (more info below)
  • Event hooks (ex: log all SQL that's executed or execute non-transactional hook on commit/rollback)

Transactions are implemented using domains. Database interactions automatically take part in an ongoing transaction so there's no need to manually pass a Client object around. Here's an example: https://github.com/sehrope/node-pg-db-examples/blob/master/src/tx.coffee

@brianc
Copy link
Owner

brianc commented Dec 11, 2014

I dig it! 👍

brianc added a commit that referenced this pull request Dec 11, 2014
Add sehrope/node-pg-db to Extras in README
@brianc brianc merged commit 8d07daf into brianc:master Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants