Is it possible to use transaction with web worker?
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 13.7k
- フォーク
- 1.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am just curious, will the transaction work as expected if I do this:
worker.postMessage({
id: 2,
action: "exec",
sql: "BEGIN TRANSACTION"
});
worker.postMessage({
id: 3,
action: "exec",
sql: "INSERT ...",
params: { "$id": 1 }
});
worker.postMessage({
id: 4,
action: "exec",
sql: "INSERT ...",
params: { "$id": 2 }
});
worker.postMessage({
id: 5,
action: "exec",
sql: "COMMIT"
});
How can I be sure, that only id 3, 4 will be committed in the current transaction? I mean, after the transaction started I can't guarantee that other async codes could be executed that could not relate to the current transaction(for example, when setTimeout happens). Is there something like the ID of the transaction, under which other queries should be executed?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
The issue names no files, tests, or entry points. Start by reviewing how web-worker exec messages are handled and how SQLite transactions span asynchronous calls. Done would require a documented answer or a clearly scoped change, but the issue does not define which.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, sqlite
- 領域
- database, web-dev
- issue の種類
- ドキュメント
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100