Skip to content

Commit

Permalink
Expose cursor ID
Browse files Browse the repository at this point in the history
Fixes DE-936
  • Loading branch information
pluma4345 committed Oct 30, 2024
1 parent e634738 commit 6b01762
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ This driver uses semantic versioning:
These properties can be used to access the headers and path used when creating
the route.

- Added `id` property to `ArrayCursor` and `BatchedArrayCursor` types (DE-936)

This property can be used to access the ID of the cursor.

## [9.1.0] - 2024-09-25

### Changed
Expand Down
14 changes: 14 additions & 0 deletions src/cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ export class BatchedArrayCursor<T = any> {
return this._db;
}

/**
* ID of this cursor.
*/
get id() {
return this._id;
}

/**
* An {@link ArrayCursor} providing item-wise access to the cursor result set.
*
Expand Down Expand Up @@ -783,6 +790,13 @@ export class ArrayCursor<T = any> {
return this._batches.database;
}

/**
* ID of this cursor.
*/
get id() {
return this._batches.id;
}

/**
* A {@link BatchedArrayCursor} providing batch-wise access to the cursor
* result set.
Expand Down

0 comments on commit 6b01762

Please sign in to comment.