@@ -63,14 +63,14 @@ parts, but not inclusive of an exact match of the key. The prefix selector may
63
63
optionally be given a ` start ` OR ` end ` key to limit the range of keys returned.
64
64
The ` start ` key is inclusive, and the ` end ` key is exclusive.
65
65
66
- The ` range ` selector matches all keys that are lexographically between the given
66
+ The range selector matches all keys that are lexicographically between the given
67
67
` start ` and ` end ` keys. The ` start ` key is inclusive, and the ` end ` key is
68
68
exclusive.
69
69
70
70
> Note: In the case of the prefix selector, the ` prefix ` key must consist only
71
71
> of full (not partial) key parts. For example, if the key ` ["foo", "bar"] `
72
72
> exists in the store, then the prefix selector ` ["foo"] ` will match it, but the
73
- > prefix selector ` ["f"] ` will not.
73
+ > prefix selector ` ["f"] ` will not. The range selector can use key parts.
74
74
75
75
The list operation may optionally be given a ` limit ` to limit the number of keys
76
76
returned.
@@ -109,7 +109,7 @@ for await (const res of iter) users.push(res);
109
109
console.log(users[0]); // { key: ["users", "alex"], value: "alex", versionstamp: "00a44a3c3e53b9750000" }
110
110
console.log(users[1]); // { key: ["users", "sam"], value: "sam", versionstamp: "00e0a2a0f0178b270000" }
111
111
112
- // Return all users starting with characters between "a" and "n"
112
+ // Return all users starting with characters between "a" and "n" (range selector)
113
113
const iter = kv.list<string>({ start: ["users", "a"], end: ["users", "n"] });
114
114
const users = [];
115
115
for await (const res of iter) users.push(res);
0 commit comments