var begin = require('../')

require('../test')("No auto-rollback", function (conn, t) {
  conn.query("DROP TABLE IF EXISTS transaction_test")
  conn.query("CREATE TABLE transaction_test (a int)")

  t.plan(2);

  // Disable auto rollback
  var tx = begin(conn, {autoRollback: false})

  tx.query('Not a valid sql statement', function(err, res) {
    t.notEqual(null, err);

    tx.query('INSERT INTO transaction_test (a) VALUES (1)', function(err, res) {
      t.equal(null, err);

      tx.commit();
    });
  });
})




@@ -203,9 +203,9 @@
 lan(
-2
+3
 );%0A%0A
@@ -322,37 +322,32 @@
 t', function(err
-, res
 ) %7B%0A    t.notEqu
@@ -438,13 +438,54 @@
 (err
-, res
+) %7B%0A      if (conn.adapter.name === 'postgres'
 ) %7B%0A
@@ -494,16 +494,18 @@
     
+ 
+ 
 t.equal(
 null
@@ -504,37 +504,201 @@
 ual(
-null, err);%0A%0A      tx.commit(
+err.code, '25P02', 'further queries ignored')%0A      %7D else %7B%0A        t.ok(!err, 'further queries succeed')%0A      %7D%0A      tx.commit(function (err) %7B%0A        t.ok(!err, 'commit succeeds')%0A      %7D
 );%0A 
@@ -712,12 +712,10 @@
   %7D);%0A%7D)
-%0A%0A%0A
+;
 %0A

make sure no-rollback test completes before connections are closed