Skip to content

Commit 91aed38

Browse files
committed
minor fixes
1 parent a89de35 commit 91aed38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

6-data-storage/03-indexeddb/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ There are two main types of search in an object store:
475475
1. By a key or a key range. That is: by `book.id` in our "books" storage.
476476
2. By another object field, e.g. `book.price`.
477477

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.
479479

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".
481481

482482
Ranges are created using following calls:
483483

@@ -486,7 +486,7 @@ Ranges are created using following calls:
486486
- `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.
487487
- `IDBKeyRange.only(key)` -- a range that consists of only one `key`, rarely used.
488488

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:
490490

491491
- `store.get(query)` -- search for the first value by a key or a range.
492492
- `store.getAll([query], [count])` -- search for all values, limit by `count` if given.
@@ -511,7 +511,7 @@ books.getAll(IDBKeyRange.upperBound('html', true))
511511
// get all books
512512
books.getAll()
513513

514-
// get all keys: id > 'js'
514+
// get all keys, where id > 'js'
515515
books.getAllKeys(IDBKeyRange.lowerBound('js', true))
516516
```
517517

0 commit comments

Comments
 (0)