Skip to content

Commit 54ea6df

Browse files
Rename 'array key' to 'composite key'. For #360
1 parent 48e3720 commit 54ea6df

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

index.bs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -614,14 +614,14 @@ A [=/key=] has an associated <dfn>type</dfn> which is one of:
614614
*string*,
615615
*binary*,
616616
or
617-
*array*.
617+
*composite*.
618618

619619
A [=/key=] also has an associated <dfn>value</dfn>, which will
620620
be either:
621621
an {{unrestricted double}} if type is *number* or *date*,
622622
a {{DOMString}} if type is *string*,
623623
a [=byte sequence=] if type is *binary*,
624-
or a [=/list=] of other [=/keys=] if type is *array*.
624+
or a [=/list=] of other [=/keys=] if type is *composite*.
625625

626626
</div>
627627

@@ -646,9 +646,9 @@ following the steps to [=convert a value to a key=].
646646
will fail.
647647
</aside>
648648

649-
An <dfn>array key</dfn> is a [=/key=] with [=key/type=] *array*.
650-
The <dfn>subkeys</dfn> of an [=array key=] are the [=list/items=] of the
651-
[=array key=]'s [=key/value=].
649+
An <dfn>composite key</dfn> is a [=/key=] with [=key/type=] *composite*.
650+
The <dfn>subkeys</dfn> of an [=composite key=] are the [=list/items=] of the
651+
[=composite key=]'s [=key/value=].
652652

653653
<div algorithm>
654654

@@ -660,8 +660,8 @@ To <dfn>compare two keys</dfn> |a| and |b|, run these steps:
660660

661661
1. If |ta| does not equal |tb|, then run these steps:
662662

663-
1. If |ta| is *array*, then return 1.
664-
1. If |tb| is *array*, then return -1.
663+
1. If |ta| is *composite*, then return 1.
664+
1. If |tb| is *composite*, then return -1.
665665
1. If |ta| is *binary*, then return 1.
666666
1. If |tb| is *binary*, then return -1.
667667
1. If |ta| is *string*, then return 1.
@@ -696,7 +696,7 @@ To <dfn>compare two keys</dfn> |a| and |b|, run these steps:
696696
1. If |vb| is [=byte less than=] |va|, then return 1.
697697
1. Return 0.
698698

699-
: *array*
699+
: *composite*
700700
::
701701
1. Let |length| be the lesser of |va|'s [=list/size=] and |vb|'s [=list/size=].
702702
1. Let |i| be 0.
@@ -731,9 +731,9 @@ of [=/comparing two keys=] with |a| and |b| is 0.
731731
*Number* keys are less than *date* keys.
732732
*Date* keys are less than *string* keys.
733733
*String* keys are less than *binary* keys.
734-
*Binary* keys are less than *array* keys.
734+
*Binary* keys are less than *composite* keys.
735735
There is no highest possible [=/key=] value.
736-
This is because an array of any candidate highest [=/key=]
736+
This is because a *composite* key of any candidate highest [=/key=]
737737
followed by another [=/key=] is even higher.
738738
</aside>
739739

@@ -857,8 +857,8 @@ object store fails.
857857

858858
An [=/index=] has a <dfn>multiEntry flag</dfn>. This flag affects how
859859
the index behaves when the result of evaluating the index's
860-
[=index/key path=] yields an [=array key=]. If its [=index/multiEntry flag=]
861-
is false, then a single [=object-store/record=] whose [=/key=] is an [=array key=]
860+
[=index/key path=] yields an [=composite key=]. If its [=index/multiEntry flag=]
861+
is false, then a single [=object-store/record=] whose [=/key=] is an [=composite key=]
862862
is added to the index. If its [=index/multiEntry flag=] is true, then
863863
one [=object-store/record=] is added to the index for each of the [=subkeys=].
864864

@@ -1601,7 +1601,7 @@ be updated.
16011601

16021602
Only specified keys of [=key/type=] *number* can affect the
16031603
[=key generator/current number=] of the key generator. Keys of [=key/type=]
1604-
*date*, *array* (regardless of the other keys they
1604+
*date*, *composite* (regardless of the other keys they
16051605
contain), *binary*, or *string* (regardless of whether
16061606
they could be parsed as numbers) have no effect on the [=key generator/current
16071607
number=] of the key generator. Keys of [=key/type=]
@@ -5667,29 +5667,29 @@ To <dfn>store a record into an object store</dfn> with
56675667
</aside>
56685668

56695669
1. If |index|'s [=index/multiEntry flag=] is false, or if |index key|
5670-
is not an [=array key=], and if |index| already contains a
5670+
is not an [=composite key=], and if |index| already contains a
56715671
[=object-store/record=] with [=/key=] [=equal to=] |index
56725672
key|, and |index|'s [=index/unique flag=] is true, then this
56735673
operation failed with a "{{ConstraintError}}" {{DOMException}}. Abort this
56745674
algorithm without taking any further steps.
56755675

56765676
1. If |index|'s [=index/multiEntry flag=] is true and |index key| is
5677-
an [=array key=], and if |index| already contains a
5677+
an [=composite key=], and if |index| already contains a
56785678
[=object-store/record=] with [=/key=] [=equal to=] any of the
56795679
[=subkeys=] of |index key|, and |index|'s [=index/unique
56805680
flag=] is true, then this operation failed with a
56815681
"{{ConstraintError}}" {{DOMException}}. Abort this algorithm without taking any
56825682
further steps.
56835683

56845684
1. If |index|'s [=index/multiEntry flag=] is false, or if |index key|
5685-
is not an [=array key=] then store a record in |index|
5685+
is not an [=composite key=] then store a record in |index|
56865686
containing |index key| as its key and |key| as its value. The
56875687
record is stored in |index|'s [=index/list of records=]
56885688
such that the list is sorted primarily on the records keys,
56895689
and secondarily on the records values, in [=ascending=] order.
56905690

56915691
1. If |index|'s [=index/multiEntry flag=] is true and |index key| is
5692-
an [=array key=], then for each |subkey| of the
5692+
an [=composite key=], then for each |subkey| of the
56935693
[=subkeys=] of |index key| store a record in |index|
56945694
containing |subkey| as its key and |key| as its value. The
56955695
records are stored in |index|'s [=index/list of
@@ -5703,10 +5703,10 @@ To <dfn>store a record into an object store</dfn> with
57035703
</aside>
57045704

57055705
<aside class=note>
5706-
Even if any member of [=subkeys=] is itself an [=array key=],
5706+
Even if any member of [=subkeys=] is itself an [=composite key=],
57075707
the member is used directly as the key for the index record.
5708-
Nested [=array keys=] are not flattened or "unpacked" to
5709-
produce multiple rows; only the outer-most [=array key=] is.
5708+
Nested [=composite keys=] are not flattened or "unpacked" to
5709+
produce multiple rows; only the outer-most [=composite key=] is.
57105710
</aside>
57115711

57125712
1. Return |key|.
@@ -6379,7 +6379,7 @@ The steps return an ECMAScript value.
63796379
in |value|.
63806380
1. Return |buffer|.
63816381

6382-
: *array*
6382+
: *composite*
63836383
::
63846384
1. Let |array| be the result of executing the ECMAScript Array
63856385
constructor with no arguments.
@@ -6457,7 +6457,7 @@ steps may throw an exception.
64576457
1. Return a new [=/key=] with [=key/type=]
64586458
*binary* and [=key/value=] |bytes|.
64596459

6460-
<!-- Array -->
6460+
<!-- Composite (Array) -->
64616461
: If |input| is an [=ECMAScript/Array exotic object=]
64626462
::
64636463
1. Let |len| be [=ECMAScript/?=] [=ECMAScript/ToLength=]( [=ECMAScript/?=] [=ECMAScript/Get=](|input|,
@@ -6486,7 +6486,7 @@ steps may throw an exception.
64866486

64876487
1. Increase |index| by 1.
64886488

6489-
1. Return a new [=array key=] with [=key/value=]
6489+
1. Return a new [=composite key=] with [=key/value=]
64906490
|keys|.
64916491

64926492

@@ -6530,7 +6530,7 @@ steps may throw an exception.
65306530

65316531
1. Increase |index| by 1.
65326532

6533-
1. Return a new [=array key=] with [=key/value=] set to |keys|.
6533+
1. Return a new [=composite key=] with [=key/value=] set to |keys|.
65346534

65356535
1. Otherwise, return the result of [=/converting a
65366536
value to a key=] with argument |input|.
@@ -6544,7 +6544,7 @@ steps may throw an exception.
65446544
not be converted to keys are ignored, and duplicates are removed.
65456545

65466546
For example, the value `[10, 20, null, 30, 20]` is
6547-
converted to an [=array key=] with [=subkeys=] 10, 20, 30.
6547+
converted to an [=composite key=] with [=subkeys=] 10, 20, 30.
65486548
</aside>
65496549

65506550

0 commit comments

Comments
 (0)