There is no commit for transactions? (No way to DELETE rows / etc?)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 13.7k
- Fork
- 1.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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();
});
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, sqlite, wasm
- Lĩnh vực
- database
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100