Skip to content
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

There is no commit for transactions? (No way to DELETE rows / etc?) #536

Open
webdevbrian opened this issue Nov 26, 2022 · 0 comments
Open

Comments

@webdevbrian
Copy link

webdevbrian commented Nov 26, 2022

Hi -- I'm attempting to DELETE a row in a simple query, however I can't db.commit(query); because it doesn't exist with sql.js seemingly? It takes the query just fine but obviously it's never committed for the changes.

Any ideas / work arounds used by other people?

Thanks

    initSqlJs().then(function (SQL) {
      const db = new SQL.Database(dbFile);
      const res = db.exec(query);
      const modified = db.getRowsModified(query);
      // db.commit(query); This doesn't exist...

      console.log(res); // shows a blank array []
      console.log(modified); // Shows the amount of "modified" rows

      resolve(res);
      db.close();
    });
@webdevbrian webdevbrian changed the title There is no commit for transactions? There is no commit for transactions? (No way to DELETE rows / etc?) Nov 26, 2022
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

No branches or pull requests

1 participant