feat(nodejs): merge insert (#1351)

closes https://github.com/lancedb/lancedb/issues/1349
This commit is contained in:
Cory Grinstead
2024-06-11 15:05:15 -05:00
committed by GitHub
parent 8e348ab4bd
commit bc19a75f65
8 changed files with 273 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import {
import { EmbeddingFunctionConfig, getRegistry } from "./embedding/registry";
import { IndexOptions } from "./indices";
import { MergeInsertBuilder } from "./merge";
import {
AddColumnsSql,
ColumnAlteration,
@@ -478,4 +479,8 @@ export class Table {
async toArrow(): Promise<ArrowTable> {
return await this.query().toArrow();
}
mergeInsert(on: string | string[]): MergeInsertBuilder {
on = Array.isArray(on) ? on : [on];
return new MergeInsertBuilder(this.inner.mergeInsert(on));
}
}