There is no commit for transactions? (No way to DELETE rows / etc?)
未关闭
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 13.7k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
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();
});
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, sqlite, wasm
- 领域
- database
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100