Skip to content

Instantly share code, notes, and snippets.

@emadb
Created October 31, 2013 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emadb/7245878 to your computer and use it in GitHub Desktop.
Save emadb/7245878 to your computer and use it in GitHub Desktop.
conn.beginTransaction( function( err ) {
//..
});
conn.queryRaw( "INSERT INTO test_txn (name) VALUES ('Anne')", function( err, results ) {
//..
});
conn.queryRaw( "INSERT INTO test_txn (name) VALUES ('Bob')", function( err, results ) {
//..
});
conn.commit( function( err ) {
//..
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment