feat(nodejs): add Enterprise table override APIs (#5077)

Add TypeScript `getTableOverrides`, `updateTableOverrides`, and
`resetTableOverrides` for LanceDB Enterprise tables, delegating to the
shared Rust implementation used by Python.

Document that updates perform GET → recursive local merge → full PUT.
Unrelated fields are preserved from the read snapshot, but concurrent
edits can be overwritten. CLI `set` and REST PUT retain replacement
semantics.

Fix an empty SDK update to return the current snapshot without a PUT.
Live testing found that the previous implementation submitted an empty
replacement and failed when no overrides were configured. The fix
applies to Python, Rust, and TypeScript.

Add mock HTTP/local coverage and an opt-in Enterprise integration suite
for namespaces, branch isolation, REST replacement, validation failures,
historical handles, and empty updates.
This commit is contained in:
Bruno Ramirez
2026-11-18 09:02:45 -08:00
committed by GitHub
parent dd69a2c535
commit 96c25bd6b9
12 changed files with 737 additions and 10 deletions
+31
View File
@@ -821,6 +821,37 @@ impl Table {
Ok(spec.map(RTEWriteSpec::from))
}
#[napi(catch_unwind, ts_return_type = "Promise<Record<string, unknown>>")]
pub async fn get_table_overrides(&self) -> napi::Result<serde_json::Value> {
self.inner_ref()?
.get_table_overrides()
.await
.default_error()
}
#[napi(
catch_unwind,
ts_args_type = "overrides: Record<string, unknown>",
ts_return_type = "Promise<Record<string, unknown>>"
)]
pub async fn update_table_overrides(
&self,
overrides: serde_json::Value,
) -> napi::Result<serde_json::Value> {
self.inner_ref()?
.update_table_overrides(overrides)
.await
.default_error()
}
#[napi(catch_unwind, ts_return_type = "Promise<Record<string, unknown>>")]
pub async fn reset_table_overrides(&self) -> napi::Result<serde_json::Value> {
self.inner_ref()?
.reset_table_overrides()
.await
.default_error()
}
#[napi(catch_unwind, js_name = "closeRTEWriters")]
pub async fn close_rte_writers(&self) -> napi::Result<()> {
self.inner_ref()?.close_rte_writers().await.default_error()