mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
feat(nodejs): add table delta streams (#5149)
Adds the Embedded `Table.delta` API to the Node.js bindings, matching the Rust/Python contract from #5135. `Table.delta(fromVersion, toVersion?)` accepts a positive safe-integer number, a positive lossless u64 `bigint`, or a same-branch tag string. `TableDelta` exposes `beginVersion`/`endVersion` as `bigint`, streaming `insertedRows()`, `updatedRows()`, `upsertedRows()`, `deletedRowIds()`, and `listTransactions()` with `readVersion` as `bigint`. Readers reuse the existing native Arrow IPC iterator adapter. They are lazy, single-use, serialize pulls, capture/cache the schema before polling, and release the native stream on completion, break, or error. Row readers retain the Rust contract: equal endpoints return empty streams with schemas, invalid/reversed/missing endpoints and cross-branch tags are rejected, and Restore or incomplete transaction history fail closed with full-rescan and range-end checkpoint guidance. Enterprise tables remain unsupported through the native Rust default. The abstract `Table` keeps a concrete unsupported `delta` default for custom subclasses; `LocalTable` overrides it. TypeDoc API docs and focused Node tests cover pinned targets, typed bigint values, transaction listing, lazy rejected readers, schema/decode failures, aliasing, and early drop. Refs OSS-2860
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / TableDeltaTransaction
|
||||
|
||||
# Interface: TableDeltaTransaction
|
||||
|
||||
A committed transaction in a table delta range.
|
||||
|
||||
## Properties
|
||||
|
||||
### operation
|
||||
|
||||
```ts
|
||||
operation: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### readVersion
|
||||
|
||||
```ts
|
||||
readVersion: bigint;
|
||||
```
|
||||
|
||||
The version the transaction was based on. Exact u64 value.
|
||||
|
||||
***
|
||||
|
||||
### tag?
|
||||
|
||||
```ts
|
||||
optional tag: string;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### transactionProperties?
|
||||
|
||||
```ts
|
||||
optional transactionProperties: Record<string, string>;
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### uuid
|
||||
|
||||
```ts
|
||||
uuid: string;
|
||||
```
|
||||
Reference in New Issue
Block a user