You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
});
The text was updated successfully, but these errors were encountered:
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
Hi -- I'm attempting to DELETE a row in a simple query, however I can't
db.commit(query);
because it doesn't exist withsql.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
The text was updated successfully, but these errors were encountered: