Skip to content

Commit 8c67cd5

Browse files
Rename 'array key' to 'composite key'. For #360
1 parent 381f97e commit 8c67cd5

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
@@ -618,14 +618,14 @@ A [=/key=] has an associated <dfn>type</dfn> which is one of:
618618
*string*,
619619
*binary*,
620620
or
621-
*array*.
621+
*composite*.
622622

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

630630
</div>
631631

@@ -650,9 +650,9 @@ following the steps to [=convert a value to a key=].
650650
will fail.
651651
</aside>
652652

653-
An <dfn>array key</dfn> is a [=/key=] with [=key/type=] *array*.
654-
The <dfn>subkeys</dfn> of an [=array key=] are the [=list/items=] of the
655-
[=array key=]'s [=key/value=].
653+
An <dfn>composite key</dfn> is a [=/key=] with [=key/type=] *composite*.
654+
The <dfn>subkeys</dfn> of an [=composite key=] are the [=list/items=] of the
655+
[=composite key=]'s [=key/value=].
656656

657657
<div algorithm>
658658

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

665665
1. If |ta| does not equal |tb|, then run these steps:
666666

667-
1. If |ta| is *array*, then return 1.
668-
1. If |tb| is *array*, then return -1.
667+
1. If |ta| is *composite*, then return 1.
668+
1. If |tb| is *composite*, then return -1.
669669
1. If |ta| is *binary*, then return 1.
670670
1. If |tb| is *binary*, then return -1.
671671
1. If |ta| is *string*, then return 1.
@@ -700,7 +700,7 @@ To <dfn>compare two keys</dfn> |a| and |b|, run these steps:
700700
1. If |vb| is [=byte less than=] |va|, then return 1.
701701
1. Return 0.
702702

703-
: *array*
703+
: *composite*
704704
::
705705
1. Let |length| be the lesser of |va|'s [=list/size=] and |vb|'s [=list/size=].
706706
1. Let |i| be 0.
@@ -735,9 +735,9 @@ of [=/comparing two keys=] with |a| and |b| is 0.
735735
*Number* keys are less than *date* keys.
736736
*Date* keys are less than *string* keys.
737737
*String* keys are less than *binary* keys.
738-
*Binary* keys are less than *array* keys.
738+
*Binary* keys are less than *composite* keys.
739739
There is no highest possible [=/key=] value.
740-
This is because an array of any candidate highest [=/key=]
740+
This is because a *composite* key of any candidate highest [=/key=]
741741
followed by another [=/key=] is even higher.
742742
</aside>
743743

@@ -861,8 +861,8 @@ object store fails.
861861

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

@@ -1605,7 +1605,7 @@ be updated.
16051605

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

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

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

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

56965696
1. If |index|'s [=index/multiEntry flag=] is true and |index key| is
5697-
an [=array key=], then for each |subkey| of the
5697+
an [=composite key=], then for each |subkey| of the
56985698
[=subkeys=] of |index key| store a record in |index|
56995699
containing |subkey| as its key and |key| as its value. The
57005700
records are stored in |index|'s [=index/list of
@@ -5708,10 +5708,10 @@ To <dfn>store a record into an object store</dfn> with
57085708
</aside>
57095709

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

57175717
1. Return |key|.
@@ -6384,7 +6384,7 @@ The steps return an ECMAScript value.
63846384
in |value|.
63856385
1. Return |buffer|.
63866386

6387-
: *array*
6387+
: *composite*
63886388
::
63896389
1. Let |array| be the result of executing the ECMAScript Array
63906390
constructor with no arguments.
@@ -6462,7 +6462,7 @@ steps may throw an exception.
64626462
1. Return a new [=/key=] with [=key/type=]
64636463
*binary* and [=key/value=] |bytes|.
64646464

6465-
<!-- Array -->
6465+
<!-- Composite (Array) -->
64666466
: If |input| is an [=/Array exotic object=]
64676467
::
64686468
1. Let |len| be [=?=] [=ToLength=]( [=?=] [=Get=](|input|,
@@ -6491,7 +6491,7 @@ steps may throw an exception.
64916491

64926492
1. Increase |index| by 1.
64936493

6494-
1. Return a new [=array key=] with [=key/value=]
6494+
1. Return a new [=composite key=] with [=key/value=]
64956495
|keys|.
64966496

64976497

@@ -6535,7 +6535,7 @@ steps may throw an exception.
65356535

65366536
1. Increase |index| by 1.
65376537

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

65406540
1. Otherwise, return the result of [=/converting a
65416541
value to a key=] with argument |input|.
@@ -6549,7 +6549,7 @@ steps may throw an exception.
65496549
not be converted to keys are ignored, and duplicates are removed.
65506550

65516551
For example, the value `[10, 20, null, 30, 20]` is
6552-
converted to an [=array key=] with [=subkeys=] 10, 20, 30.
6552+
converted to an [=composite key=] with [=subkeys=] 10, 20, 30.
65536553
</aside>
65546554

65556555

0 commit comments

Comments
 (0)