You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 6-data-storage/03-indexeddb/article.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -475,9 +475,9 @@ There are two main types of search in an object store:
475
475
1. By a key or a key range. That is: by `book.id` in our "books" storage.
476
476
2. By another object field, e.g. `book.price`.
477
477
478
-
First let's deal with the keys and key ranges `(1)`.
478
+
First let's deal with the first type of search: by a key.
479
479
480
-
Methods that involve searching support either exact keys or so-called "range queries" -- [IDBKeyRange](https://www.w3.org/TR/IndexedDB/#keyrange) objects that specify a "key range".
480
+
Searching methods support both exact keys and so-called "ranges" -- [IDBKeyRange](https://www.w3.org/TR/IndexedDB/#keyrange) objects that specify an acceptable "key range".
481
481
482
482
Ranges are created using following calls:
483
483
@@ -486,7 +486,7 @@ Ranges are created using following calls:
486
486
-`IDBKeyRange.bound(lower, upper, [lowerOpen], [upperOpen])` means: between `lower` and `upper`. If the open flags is true, the corresponding key is not included in the range.
487
487
-`IDBKeyRange.only(key)` -- a range that consists of only one `key`, rarely used.
488
488
489
-
All searching methods accept a `query` argument that can be either an exact key or a key range:
489
+
Searching methods accept a `query` argument that can be either an exact key or a key range:
490
490
491
491
-`store.get(query)` -- search for the first value by a key or a range.
492
492
-`store.getAll([query], [count])` -- search for all values, limit by `count` if given.
0 commit comments