Skip to content

Commit 1663ca9

Browse files
Allow a transaction's scope to change if the transaction is an upgrade (#357)
Fixes #356
1 parent 92322af commit 1663ca9

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

index.bs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,9 @@ and data mutation operations.
900900
All transactions are created through a [=/connection=], which is the
901901
transaction's <dfn>connection</dfn>.
902902

903-
A [=/transaction=] has a <dfn>scope</dfn> which is a [=/set=] of [=/object stores=] that the transaction may interact with. A transaction's scope remains fixed for the lifetime of that transaction.
903+
A [=/transaction=] has a <dfn>scope</dfn> which is a [=/set=] of [=/object stores=] that the transaction may interact with.
904+
905+
Note: A [=/transaction=]'s [=scope=] remains fixed unless the [=/transaction=] is an [=/upgrade transaction=].
904906

905907
Two [=/transactions=] have <dfn lt="overlap|overlapping scope">overlapping scope</dfn> if any [=/object store=] is in both transactions' [=transaction/scope=].
906908

@@ -4773,15 +4775,7 @@ enum IDBTransactionMode {
47734775

47744776
<div algorithm>
47754777

4776-
The <dfn attribute for=IDBTransaction>objectStoreNames</dfn> getter steps are:
4777-
4778-
1. If [=/this=] is an [=/upgrade transaction=],
4779-
then return a new {{DOMStringList}} associated with a [=sorted name list=] of the [=object-store/names=]
4780-
of the [=/object stores=] in [=/this=]'s [=/connection=]'s [=object store set=].
4781-
4782-
1. Otherwise, return a new {{DOMStringList}} associated with a [=sorted name list=] of the
4783-
[=object-store/names=] of the [=/object stores=] in
4784-
[=/this=]'s [=transaction/scope=].
4778+
The <dfn attribute for=IDBTransaction>objectStoreNames</dfn> getter steps are to return a new {{DOMStringList}} associated with a [=sorted name list=] of the [=object-store/names=] of the [=/object stores=] in [=/this=]'s [=transaction/scope=].
47854779

47864780
</div>
47874781

@@ -5310,16 +5304,16 @@ created [=/request=] belongs to is [=transaction/aborted=] using the steps to
53105304

53115305
<div algorithm>
53125306

5313-
To <dfn>run an upgrade transaction</dfn> with a |connection| object
5307+
To <dfn>run an upgrade transaction</dfn> with |connection| (a [=/connection=])
53145308
which is used to update the [=database=], a new |version| to be set
53155309
for the [=database=], and a |request|, run these steps:
53165310

53175311
1. Let |db| be |connection|'s [=database=].
53185312

53195313
1. Let |transaction| be a new [=/upgrade transaction=] with
5320-
|connection| used as [=/connection=]. The [=transaction/scope=] of
5321-
|transaction| includes every [=/object store=] in
5322-
|connection|.
5314+
|connection| used as [=/connection=].
5315+
5316+
1. Set |transaction|'s [=transaction/scope=] to |connection|'s [=object store set=].
53235317

53245318
1. Set |db|'s [=database/upgrade transaction=] to |transaction|.
53255319

0 commit comments

Comments
 (0)