Skip to content

Commit 6b01762

Browse files
committed
Expose cursor ID
Fixes DE-936
1 parent e634738 commit 6b01762

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ This driver uses semantic versioning:
2929
These properties can be used to access the headers and path used when creating
3030
the route.
3131

32+
- Added `id` property to `ArrayCursor` and `BatchedArrayCursor` types (DE-936)
33+
34+
This property can be used to access the ID of the cursor.
35+
3236
## [9.1.0] - 2024-09-25
3337

3438
### Changed

src/cursor.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ export class BatchedArrayCursor<T = any> {
233233
return this._db;
234234
}
235235

236+
/**
237+
* ID of this cursor.
238+
*/
239+
get id() {
240+
return this._id;
241+
}
242+
236243
/**
237244
* An {@link ArrayCursor} providing item-wise access to the cursor result set.
238245
*
@@ -783,6 +790,13 @@ export class ArrayCursor<T = any> {
783790
return this._batches.database;
784791
}
785792

793+
/**
794+
* ID of this cursor.
795+
*/
796+
get id() {
797+
return this._batches.id;
798+
}
799+
786800
/**
787801
* A {@link BatchedArrayCursor} providing batch-wise access to the cursor
788802
* result set.

0 commit comments

Comments
 (0)