Skip to content

Commit

Permalink
Merge branch 'master' into feat/integration-ssr-api
Browse files Browse the repository at this point in the history
  • Loading branch information
MRinaldi9 committed Nov 18, 2024
2 parents e23352b + 7e1c325 commit 6aaa6de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Returns the open cursor event

```js
this.dbService.openCursor('people', IDBKeyRange.bound("A", "F")).subscribe((evt) => {
var cursor = (evt.target as IDBOpenDBRequest).result;
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
if(cursor) {
console.log(cursor.value);
cursor.continue();
Expand All @@ -415,7 +415,7 @@ Open a cursor by index filter.

```js
this.dbService.openCursorByIndex('people', 'name', IDBKeyRange.only('john')).subscribe((evt) => {
var cursor = (evt.target as IDBOpenDBRequest).result;
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
if(cursor) {
console.log(cursor.value);
cursor.continue();
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-indexed-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Returns the open cursor event

```js
this.dbService.openCursor('people', IDBKeyRange.bound("A", "F")).subscribe((evt) => {
var cursor = (evt.target as IDBOpenDBRequest).result;
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
if(cursor) {
console.log(cursor.value);
cursor.continue();
Expand All @@ -413,7 +413,7 @@ Open a cursor by index filter.

```js
this.dbService.openCursorByIndex('people', 'name', IDBKeyRange.only('john')).subscribe((evt) => {
var cursor = (evt.target as IDBOpenDBRequest).result;
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
if(cursor) {
console.log(cursor.value);
cursor.continue();
Expand Down
1 change: 1 addition & 0 deletions projects/ngx-indexed-db/src/lib/ngx-indexed-db.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export class NgxIndexedDBService {
* Returns the open cursor event
* @param storeName The name of the store to have the entries deleted
* @param keyRange The key range which the cursor should be open on
* @param direction A string telling the cursor which direction to travel. The default is next
*/
openCursor(storeName: string, keyRange?: IDBKeyRange, direction: IDBCursorDirection = 'next'): Observable<Event> {
return new Observable((obs) => {
Expand Down

0 comments on commit 6aaa6de

Please sign in to comment.