Skip to content

no rollback is performed on error #10

Description

@fusionstream

Running this on a nwjs-compiled sqlite3 in nwjs


db.run ("CREATE TABLE `test` (`index` INTEGER) PRIMARY KEY(`INTEGER`);");

db.beginTransaction(function(err, transaction) {
   transaction.run("INSERT ..."); //left this in by accident and even this did not trigger a rollback
   for (var i = 0; i < 3; i++) {
      transaction.run("INSERT INTO `test` VALUES (1);");
   }
   transaction.commit(function(err) {
      if (err) return console.log("Sad panda :-( commit() failed.", err);
      console.log("Happy panda :-) commit() was successful.");
   });
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions