There is no commit for transactions? (No way to DELETE rows / etc?)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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();
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the initSqlJs() callback and inspect the db.exec(query), db.getRowsModified(query), and db.close() flow shown in the report. Determine how a DELETE is retained or persisted after execution, and whether the expected save or reload path is documented. Done means the behavior is clarified or a reproducible transaction/persistence fix is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sqlite, wasm
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100