Skip to content

Commit 2136b34

Browse files
docs(readme): update get all method desc
1 parent 037e335 commit 2136b34

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,10 @@ this.dbService.getByKey('people', 1).then(
132132
);
133133
```
134134

135-
#### getAll(storeName, keyRange, indexDetails)
135+
#### getAll(storeName)
136136

137137
Returns an array of all the items in the given objectStore.
138138
The first parameter is the store name to query.
139-
The second parameter is an optional IDBKeyRange object.
140-
The third parameter is an index details which must include index name and an optional order parameter.
141139
**getAll** returns a promise that is resolved when we have the array of items or rejected if an error occurred.
142140

143141
Usage example:
@@ -298,17 +296,16 @@ The second parameter is an index details which must include index name and an op
298296
The third parameter is an `IDBKeyRange` object.
299297
**getAllByIndex** returns a promise that is resolved when we have the array of items or rejected if an error occurred.
300298

301-
302-
Usage example:
299+
Usage example:
303300

304301
```js
305302
this.dbService.getAllByIndex('people', 'name', IDBKeyRange.only('john')).then(
306-
(array) => {
307-
// Do something with the array
308-
},
309-
error => {
303+
array => {
304+
// Do something with the array
305+
},
306+
error => {
310307
console.log(error);
311-
}
308+
}
312309
);
313310
```
314311

0 commit comments

Comments
 (0)