@lancedb/lancedb 0.30.0 → 0.30.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/merge.d.ts +25 -0
- package/dist/merge.js +29 -0
- package/dist/native.d.ts +23 -0
- package/dist/native.js +52 -52
- package/dist/table.d.ts +40 -2
- package/dist/table.js +6 -0
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { Connection } from "./connection";
|
|
|
2
2
|
import { ConnectNamespaceOptions, ConnectionOptions, Session } from "./native.js";
|
|
3
3
|
import { HeaderProvider } from "./header";
|
|
4
4
|
export { JsHeaderProvider as NativeJsHeaderProvider } from "./native.js";
|
|
5
|
-
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, MergeResult, AddResult, AddColumnsResult, AlterColumnsResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, } from "./native.js";
|
|
5
|
+
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, MergeResult, AddResult, AddColumnsResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, } from "./native.js";
|
|
6
6
|
export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
7
7
|
export { Connection, CreateTableOptions, TableNamesOptions, OpenTableOptions, ListNamespacesOptions, CreateNamespaceOptions, DropNamespaceOptions, ListNamespacesResponse, CreateNamespaceResponse, DropNamespaceResponse, DescribeNamespaceResponse, RenameTableOptions, } from "./connection";
|
|
8
8
|
export { Session } from "./native.js";
|
|
9
9
|
export { ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, QueryExecutionOptions, ColumnOrdering, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, BooleanQuery, FullTextQueryType, Operator, Occur, } from "./query";
|
|
10
10
|
export { Index, IndexOptions, IvfPqOptions, IvfRqOptions, IvfFlatOptions, HnswPqOptions, HnswSqOptions, FtsOptions, } from "./indices";
|
|
11
|
-
export { Table, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, LsmWriteSpec, ColumnAlteration, } from "./table";
|
|
11
|
+
export { Table, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, LsmWriteSpec, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
12
12
|
export { HeaderProvider, StaticHeaderProvider, OAuthHeaderProvider, TokenResponse, } from "./header";
|
|
13
13
|
export { MergeInsertBuilder, WriteExecutionOptions } from "./merge";
|
|
14
14
|
export * as embedding from "./embedding";
|
package/dist/merge.d.ts
CHANGED
|
@@ -56,6 +56,31 @@ export declare class MergeInsertBuilder {
|
|
|
56
56
|
* @param useIndex - Whether to use indices for the merge operation. Defaults to `true`.
|
|
57
57
|
*/
|
|
58
58
|
useIndex(useIndex: boolean): MergeInsertBuilder;
|
|
59
|
+
/**
|
|
60
|
+
* Controls whether the merge uses the MemWAL LSM write path.
|
|
61
|
+
*
|
|
62
|
+
* By default (unset), a `mergeInsert` on a table with an LSM write spec is
|
|
63
|
+
* routed through Lance's MemWAL shard writer, and a table without one uses
|
|
64
|
+
* the standard path. Pass `false` to force the standard path even when a
|
|
65
|
+
* spec is set. Pass `true` to require a spec — `mergeInsert` rejects if none
|
|
66
|
+
* is installed.
|
|
67
|
+
*
|
|
68
|
+
* @param useLsmWrite - Whether to use the LSM write path.
|
|
69
|
+
*/
|
|
70
|
+
useLsmWrite(useLsmWrite: boolean): MergeInsertBuilder;
|
|
71
|
+
/**
|
|
72
|
+
* Controls how an LSM merge checks that its input targets a single shard.
|
|
73
|
+
*
|
|
74
|
+
* When a table has an LSM write spec, every row in a `mergeInsert` call must
|
|
75
|
+
* route to the same shard. When `true` (the default), every row is inspected
|
|
76
|
+
* to verify this. When `false`, only the first row is inspected and the
|
|
77
|
+
* shard it routes to is used for the whole input — a faster path for callers
|
|
78
|
+
* that have already pre-sharded their input. Has no effect on tables without
|
|
79
|
+
* an LSM write spec.
|
|
80
|
+
*
|
|
81
|
+
* @param validateSingleShard - Whether to check every row routes to one shard. Defaults to `true`.
|
|
82
|
+
*/
|
|
83
|
+
validateSingleShard(validateSingleShard: boolean): MergeInsertBuilder;
|
|
59
84
|
/**
|
|
60
85
|
* Executes the merge insert operation
|
|
61
86
|
*
|
package/dist/merge.js
CHANGED
|
@@ -68,6 +68,35 @@ class MergeInsertBuilder {
|
|
|
68
68
|
useIndex(useIndex) {
|
|
69
69
|
return new MergeInsertBuilder(this.#native.useIndex(useIndex), this.#schema);
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Controls whether the merge uses the MemWAL LSM write path.
|
|
73
|
+
*
|
|
74
|
+
* By default (unset), a `mergeInsert` on a table with an LSM write spec is
|
|
75
|
+
* routed through Lance's MemWAL shard writer, and a table without one uses
|
|
76
|
+
* the standard path. Pass `false` to force the standard path even when a
|
|
77
|
+
* spec is set. Pass `true` to require a spec — `mergeInsert` rejects if none
|
|
78
|
+
* is installed.
|
|
79
|
+
*
|
|
80
|
+
* @param useLsmWrite - Whether to use the LSM write path.
|
|
81
|
+
*/
|
|
82
|
+
useLsmWrite(useLsmWrite) {
|
|
83
|
+
return new MergeInsertBuilder(this.#native.useLsmWrite(useLsmWrite), this.#schema);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Controls how an LSM merge checks that its input targets a single shard.
|
|
87
|
+
*
|
|
88
|
+
* When a table has an LSM write spec, every row in a `mergeInsert` call must
|
|
89
|
+
* route to the same shard. When `true` (the default), every row is inspected
|
|
90
|
+
* to verify this. When `false`, only the first row is inspected and the
|
|
91
|
+
* shard it routes to is used for the whole input — a faster path for callers
|
|
92
|
+
* that have already pre-sharded their input. Has no effect on tables without
|
|
93
|
+
* an LSM write spec.
|
|
94
|
+
*
|
|
95
|
+
* @param validateSingleShard - Whether to check every row routes to one shard. Defaults to `true`.
|
|
96
|
+
*/
|
|
97
|
+
validateSingleShard(validateSingleShard) {
|
|
98
|
+
return new MergeInsertBuilder(this.#native.validateSingleShard(validateSingleShard), this.#schema);
|
|
99
|
+
}
|
|
71
100
|
/**
|
|
72
101
|
* Executes the merge insert operation
|
|
73
102
|
*
|
package/dist/native.d.ts
CHANGED
|
@@ -102,6 +102,8 @@ export declare class NativeMergeInsertBuilder {
|
|
|
102
102
|
whenNotMatchedBySourceDelete(filter?: string | undefined | null): NativeMergeInsertBuilder
|
|
103
103
|
setTimeout(timeout: number): void
|
|
104
104
|
useIndex(useIndex: boolean): NativeMergeInsertBuilder
|
|
105
|
+
useLsmWrite(useLsmWrite: boolean): NativeMergeInsertBuilder
|
|
106
|
+
validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
|
|
105
107
|
execute(buf: Buffer): Promise<MergeResult>
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -214,10 +216,12 @@ export declare class Table {
|
|
|
214
216
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
215
217
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
216
218
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
219
|
+
updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
|
|
217
220
|
dropColumns(columns: Array<string>): Promise<DropColumnsResult>
|
|
218
221
|
setUnenforcedPrimaryKey(columns: Array<string>): Promise<void>
|
|
219
222
|
setLsmWriteSpec(spec: LsmWriteSpec): Promise<void>
|
|
220
223
|
unsetLsmWriteSpec(): Promise<void>
|
|
224
|
+
closeLsmWriters(): Promise<void>
|
|
221
225
|
version(): Promise<number>
|
|
222
226
|
checkout(version: number): Promise<void>
|
|
223
227
|
checkoutTag(tag: string): Promise<void>
|
|
@@ -485,6 +489,20 @@ export interface DropNamespaceResponse {
|
|
|
485
489
|
transactionId?: Array<string>
|
|
486
490
|
}
|
|
487
491
|
|
|
492
|
+
/**
|
|
493
|
+
* A per-field metadata update, addressed by dot-path. Merges into the field's
|
|
494
|
+
* existing metadata by default; a `null` value deletes a key, and `replace`
|
|
495
|
+
* swaps the field's entire metadata map.
|
|
496
|
+
*/
|
|
497
|
+
export interface FieldMetadataUpdate {
|
|
498
|
+
/** Dot-separated path to the field (e.g. "embedding" or "a.b.c"). */
|
|
499
|
+
path: string
|
|
500
|
+
/** Metadata keys to set; a `null` value deletes that key. */
|
|
501
|
+
metadata: Record<string, string | undefined | null>
|
|
502
|
+
/** If true, replace the field's entire metadata map instead of merging. */
|
|
503
|
+
replace?: boolean
|
|
504
|
+
}
|
|
505
|
+
|
|
488
506
|
export interface FragmentStatistics {
|
|
489
507
|
/** The number of fragments in the table */
|
|
490
508
|
numFragments: number
|
|
@@ -580,6 +598,7 @@ export interface MergeResult {
|
|
|
580
598
|
numUpdatedRows: number
|
|
581
599
|
numDeletedRows: number
|
|
582
600
|
numAttempts: number
|
|
601
|
+
numRows: number
|
|
583
602
|
}
|
|
584
603
|
|
|
585
604
|
export interface OpenTableOptions {
|
|
@@ -746,6 +765,10 @@ export interface TlsConfig {
|
|
|
746
765
|
assertHostname?: boolean
|
|
747
766
|
}
|
|
748
767
|
|
|
768
|
+
export interface UpdateFieldMetadataResult {
|
|
769
|
+
version: number
|
|
770
|
+
}
|
|
771
|
+
|
|
749
772
|
export interface UpdateResult {
|
|
750
773
|
rowsUpdated: number
|
|
751
774
|
version: number
|
package/dist/native.js
CHANGED
|
@@ -76,8 +76,8 @@ function requireNative() {
|
|
|
76
76
|
try {
|
|
77
77
|
const binding = require('@lancedb/lancedb-android-arm64');
|
|
78
78
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
|
|
79
|
-
if (bindingPackageVersion !== '0.30.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
79
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
}
|
|
82
82
|
return binding;
|
|
83
83
|
}
|
|
@@ -95,8 +95,8 @@ function requireNative() {
|
|
|
95
95
|
try {
|
|
96
96
|
const binding = require('@lancedb/lancedb-android-arm-eabi');
|
|
97
97
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
|
|
98
|
-
if (bindingPackageVersion !== '0.30.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
98
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
99
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
100
|
}
|
|
101
101
|
return binding;
|
|
102
102
|
}
|
|
@@ -120,8 +120,8 @@ function requireNative() {
|
|
|
120
120
|
try {
|
|
121
121
|
const binding = require('@lancedb/lancedb-win32-x64-gnu');
|
|
122
122
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
|
|
123
|
-
if (bindingPackageVersion !== '0.30.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
123
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
124
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
125
125
|
}
|
|
126
126
|
return binding;
|
|
127
127
|
}
|
|
@@ -139,8 +139,8 @@ function requireNative() {
|
|
|
139
139
|
try {
|
|
140
140
|
const binding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
141
141
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
|
|
142
|
-
if (bindingPackageVersion !== '0.30.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
142
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
143
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
144
144
|
}
|
|
145
145
|
return binding;
|
|
146
146
|
}
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
161
161
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
|
|
162
|
-
if (bindingPackageVersion !== '0.30.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
162
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
164
|
}
|
|
165
165
|
return binding;
|
|
166
166
|
}
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@lancedb/lancedb-win32-arm64-msvc');
|
|
180
180
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
|
|
181
|
-
if (bindingPackageVersion !== '0.30.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
181
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
183
183
|
}
|
|
184
184
|
return binding;
|
|
185
185
|
}
|
|
@@ -201,8 +201,8 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require('@lancedb/lancedb-darwin-universal');
|
|
203
203
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
|
|
204
|
-
if (bindingPackageVersion !== '0.30.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
204
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
205
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
}
|
|
207
207
|
return binding;
|
|
208
208
|
}
|
|
@@ -219,8 +219,8 @@ function requireNative() {
|
|
|
219
219
|
try {
|
|
220
220
|
const binding = require('@lancedb/lancedb-darwin-x64');
|
|
221
221
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
|
|
222
|
-
if (bindingPackageVersion !== '0.30.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
222
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
224
224
|
}
|
|
225
225
|
return binding;
|
|
226
226
|
}
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@lancedb/lancedb-darwin-arm64');
|
|
240
240
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
|
|
241
|
-
if (bindingPackageVersion !== '0.30.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
241
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
}
|
|
244
244
|
return binding;
|
|
245
245
|
}
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@lancedb/lancedb-freebsd-x64');
|
|
264
264
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
|
|
265
|
-
if (bindingPackageVersion !== '0.30.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
265
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
267
267
|
}
|
|
268
268
|
return binding;
|
|
269
269
|
}
|
|
@@ -281,8 +281,8 @@ function requireNative() {
|
|
|
281
281
|
try {
|
|
282
282
|
const binding = require('@lancedb/lancedb-freebsd-arm64');
|
|
283
283
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
|
|
284
|
-
if (bindingPackageVersion !== '0.30.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
284
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
285
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
}
|
|
287
287
|
return binding;
|
|
288
288
|
}
|
|
@@ -306,8 +306,8 @@ function requireNative() {
|
|
|
306
306
|
try {
|
|
307
307
|
const binding = require('@lancedb/lancedb-linux-x64-musl');
|
|
308
308
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
|
|
309
|
-
if (bindingPackageVersion !== '0.30.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
309
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
310
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
311
311
|
}
|
|
312
312
|
return binding;
|
|
313
313
|
}
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
327
327
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
|
|
328
|
-
if (bindingPackageVersion !== '0.30.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
328
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
330
330
|
}
|
|
331
331
|
return binding;
|
|
332
332
|
}
|
|
@@ -346,8 +346,8 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
348
348
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
|
|
349
|
-
if (bindingPackageVersion !== '0.30.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
349
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
350
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
}
|
|
352
352
|
return binding;
|
|
353
353
|
}
|
|
@@ -365,8 +365,8 @@ function requireNative() {
|
|
|
365
365
|
try {
|
|
366
366
|
const binding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
367
367
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
|
|
368
|
-
if (bindingPackageVersion !== '0.30.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
368
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
369
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
370
|
}
|
|
371
371
|
return binding;
|
|
372
372
|
}
|
|
@@ -386,8 +386,8 @@ function requireNative() {
|
|
|
386
386
|
try {
|
|
387
387
|
const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
388
388
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
|
|
389
|
-
if (bindingPackageVersion !== '0.30.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
389
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
390
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
391
391
|
}
|
|
392
392
|
return binding;
|
|
393
393
|
}
|
|
@@ -405,8 +405,8 @@ function requireNative() {
|
|
|
405
405
|
try {
|
|
406
406
|
const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
407
407
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
|
|
408
|
-
if (bindingPackageVersion !== '0.30.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
408
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
409
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
410
410
|
}
|
|
411
411
|
return binding;
|
|
412
412
|
}
|
|
@@ -426,8 +426,8 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = require('@lancedb/lancedb-linux-loong64-musl');
|
|
428
428
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
|
|
429
|
-
if (bindingPackageVersion !== '0.30.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
429
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
431
431
|
}
|
|
432
432
|
return binding;
|
|
433
433
|
}
|
|
@@ -445,8 +445,8 @@ function requireNative() {
|
|
|
445
445
|
try {
|
|
446
446
|
const binding = require('@lancedb/lancedb-linux-loong64-gnu');
|
|
447
447
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
|
|
448
|
-
if (bindingPackageVersion !== '0.30.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
448
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
449
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
450
450
|
}
|
|
451
451
|
return binding;
|
|
452
452
|
}
|
|
@@ -466,8 +466,8 @@ function requireNative() {
|
|
|
466
466
|
try {
|
|
467
467
|
const binding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
468
468
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
|
|
469
|
-
if (bindingPackageVersion !== '0.30.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
469
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
470
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
471
471
|
}
|
|
472
472
|
return binding;
|
|
473
473
|
}
|
|
@@ -485,8 +485,8 @@ function requireNative() {
|
|
|
485
485
|
try {
|
|
486
486
|
const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
|
|
487
487
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
|
|
488
|
-
if (bindingPackageVersion !== '0.30.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
488
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
489
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
490
490
|
}
|
|
491
491
|
return binding;
|
|
492
492
|
}
|
|
@@ -505,8 +505,8 @@ function requireNative() {
|
|
|
505
505
|
try {
|
|
506
506
|
const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
|
|
507
507
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
|
|
508
|
-
if (bindingPackageVersion !== '0.30.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
508
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
509
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
510
510
|
}
|
|
511
511
|
return binding;
|
|
512
512
|
}
|
|
@@ -524,8 +524,8 @@ function requireNative() {
|
|
|
524
524
|
try {
|
|
525
525
|
const binding = require('@lancedb/lancedb-linux-s390x-gnu');
|
|
526
526
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
|
|
527
|
-
if (bindingPackageVersion !== '0.30.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
527
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
528
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
529
529
|
}
|
|
530
530
|
return binding;
|
|
531
531
|
}
|
|
@@ -548,8 +548,8 @@ function requireNative() {
|
|
|
548
548
|
try {
|
|
549
549
|
const binding = require('@lancedb/lancedb-openharmony-arm64');
|
|
550
550
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
|
|
551
|
-
if (bindingPackageVersion !== '0.30.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
551
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
552
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
553
553
|
}
|
|
554
554
|
return binding;
|
|
555
555
|
}
|
|
@@ -567,8 +567,8 @@ function requireNative() {
|
|
|
567
567
|
try {
|
|
568
568
|
const binding = require('@lancedb/lancedb-openharmony-x64');
|
|
569
569
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
|
|
570
|
-
if (bindingPackageVersion !== '0.30.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
570
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
571
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
572
572
|
}
|
|
573
573
|
return binding;
|
|
574
574
|
}
|
|
@@ -586,8 +586,8 @@ function requireNative() {
|
|
|
586
586
|
try {
|
|
587
587
|
const binding = require('@lancedb/lancedb-openharmony-arm');
|
|
588
588
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
|
|
589
|
-
if (bindingPackageVersion !== '0.30.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.30.
|
|
589
|
+
if (bindingPackageVersion !== '0.30.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
590
|
+
throw new Error(`Native binding package version mismatch, expected 0.30.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Table as ArrowTable, Data, DataType, Field, IntoVector, MultiVector, Schema } from "./arrow";
|
|
2
2
|
import { IndexOptions } from "./indices";
|
|
3
3
|
import { MergeInsertBuilder } from "./merge";
|
|
4
|
-
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, OptimizeStats, TableStatistics, Tags, UpdateResult, Table as _NativeTable } from "./native";
|
|
4
|
+
import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, OptimizeStats, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
|
|
5
5
|
import { FullTextQuery, Query, TakeQuery, VectorQuery } from "./query";
|
|
6
6
|
import { IntoSql } from "./util";
|
|
7
7
|
export { IndexConfig } from "./native";
|
|
@@ -114,7 +114,10 @@ export interface Version {
|
|
|
114
114
|
*
|
|
115
115
|
* `specType` is `"bucket"`, `"identity"`, or `"unsharded"`. For `"bucket"`,
|
|
116
116
|
* `column` and `numBuckets` are required; for `"identity"`, `column` is
|
|
117
|
-
* required
|
|
117
|
+
* required and must be a deterministic function of the unenforced primary
|
|
118
|
+
* key (every row with a given primary key must always produce the same
|
|
119
|
+
* `column` value, or upserts of that key can land in different shards and a
|
|
120
|
+
* stale version can win).
|
|
118
121
|
*/
|
|
119
122
|
export interface LsmWriteSpec {
|
|
120
123
|
/** One of `"bucket"`, `"identity"`, or `"unsharded"`. */
|
|
@@ -419,6 +422,14 @@ export declare abstract class Table {
|
|
|
419
422
|
* containing the new version number of the table after altering the columns.
|
|
420
423
|
*/
|
|
421
424
|
abstract alterColumns(columnAlterations: ColumnAlteration[]): Promise<AlterColumnsResult>;
|
|
425
|
+
/**
|
|
426
|
+
* Update per-field (column) metadata.
|
|
427
|
+
* @param {FieldMetadataUpdate[]} updates One or more per-field updates. Each
|
|
428
|
+
* update's metadata is merged into the field's existing metadata by default;
|
|
429
|
+
* a value of `null` deletes that key, and `replace: true` swaps the whole map.
|
|
430
|
+
* @returns {Promise<UpdateFieldMetadataResult>} resolves to the new table version.
|
|
431
|
+
*/
|
|
432
|
+
abstract updateFieldMetadata(updates: FieldMetadataUpdate[]): Promise<UpdateFieldMetadataResult>;
|
|
422
433
|
/**
|
|
423
434
|
* Drop one or more columns from the dataset
|
|
424
435
|
*
|
|
@@ -481,6 +492,16 @@ export declare abstract class Table {
|
|
|
481
492
|
* @returns {Promise<void>}
|
|
482
493
|
*/
|
|
483
494
|
abstract unsetLsmWriteSpec(): Promise<void>;
|
|
495
|
+
/**
|
|
496
|
+
* Drain and close any cached MemWAL shard writers held for this table.
|
|
497
|
+
*
|
|
498
|
+
* When an {@link LsmWriteSpec} is installed, `mergeInsert` opens MemWAL
|
|
499
|
+
* shard writers and caches them for reuse across calls. This closes them,
|
|
500
|
+
* flushing pending data; writers reopen lazily on the next `mergeInsert`.
|
|
501
|
+
* It is a no-op when no writers are cached.
|
|
502
|
+
* @returns {Promise<void>}
|
|
503
|
+
*/
|
|
504
|
+
abstract closeLsmWriters(): Promise<void>;
|
|
484
505
|
/** Retrieve the version of the table */
|
|
485
506
|
abstract version(): Promise<number>;
|
|
486
507
|
/**
|
|
@@ -641,10 +662,12 @@ export declare class LocalTable extends Table {
|
|
|
641
662
|
vectorSearch(vector: IntoVector | MultiVector): VectorQuery;
|
|
642
663
|
addColumns(newColumnTransforms: AddColumnsSql[] | Field | Field[] | Schema): Promise<AddColumnsResult>;
|
|
643
664
|
alterColumns(columnAlterations: ColumnAlteration[]): Promise<AlterColumnsResult>;
|
|
665
|
+
updateFieldMetadata(updates: FieldMetadataUpdate[]): Promise<UpdateFieldMetadataResult>;
|
|
644
666
|
dropColumns(columnNames: string[]): Promise<DropColumnsResult>;
|
|
645
667
|
setUnenforcedPrimaryKey(columns: string | string[]): Promise<void>;
|
|
646
668
|
setLsmWriteSpec(spec: LsmWriteSpec): Promise<void>;
|
|
647
669
|
unsetLsmWriteSpec(): Promise<void>;
|
|
670
|
+
closeLsmWriters(): Promise<void>;
|
|
648
671
|
version(): Promise<number>;
|
|
649
672
|
checkout(version: number | string): Promise<void>;
|
|
650
673
|
checkoutLatest(): Promise<void>;
|
|
@@ -715,3 +738,18 @@ export interface ColumnAlteration {
|
|
|
715
738
|
/** Set the new nullability. Note that a nullable column cannot be made non-nullable. */
|
|
716
739
|
nullable?: boolean;
|
|
717
740
|
}
|
|
741
|
+
/** A per-field metadata update, addressed by dot-path. */
|
|
742
|
+
export interface FieldMetadataUpdate {
|
|
743
|
+
/**
|
|
744
|
+
* Dot-separated path to the field. For a top-level column this is just its
|
|
745
|
+
* name; for a nested field it's the path, e.g. "a.b.c".
|
|
746
|
+
*/
|
|
747
|
+
path: string;
|
|
748
|
+
/**
|
|
749
|
+
* Metadata key/value pairs. Merged into the field's existing metadata by
|
|
750
|
+
* default; a value of `null` deletes that key.
|
|
751
|
+
*/
|
|
752
|
+
metadata: Record<string, string | null>;
|
|
753
|
+
/** If true, replace the field's entire metadata map instead of merging. */
|
|
754
|
+
replace?: boolean;
|
|
755
|
+
}
|
package/dist/table.js
CHANGED
|
@@ -269,6 +269,9 @@ class LocalTable extends Table {
|
|
|
269
269
|
});
|
|
270
270
|
return await this.inner.alterColumns(processedAlterations);
|
|
271
271
|
}
|
|
272
|
+
async updateFieldMetadata(updates) {
|
|
273
|
+
return await this.inner.updateFieldMetadata(updates);
|
|
274
|
+
}
|
|
272
275
|
async dropColumns(columnNames) {
|
|
273
276
|
return await this.inner.dropColumns(columnNames);
|
|
274
277
|
}
|
|
@@ -282,6 +285,9 @@ class LocalTable extends Table {
|
|
|
282
285
|
async unsetLsmWriteSpec() {
|
|
283
286
|
return await this.inner.unsetLsmWriteSpec();
|
|
284
287
|
}
|
|
288
|
+
async closeLsmWriters() {
|
|
289
|
+
return await this.inner.closeLsmWriters();
|
|
290
|
+
}
|
|
285
291
|
async version() {
|
|
286
292
|
return await this.inner.version();
|
|
287
293
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.30.
|
|
14
|
+
"version": "0.30.1-beta.1",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
"reflect-metadata": "^0.2.2"
|
|
103
103
|
},
|
|
104
104
|
"optionalDependencies": {
|
|
105
|
-
"@lancedb/lancedb-darwin-arm64": "0.30.
|
|
106
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.30.
|
|
107
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.30.
|
|
108
|
-
"@lancedb/lancedb-linux-x64-musl": "0.30.
|
|
109
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.30.
|
|
110
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.30.
|
|
111
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.30.
|
|
105
|
+
"@lancedb/lancedb-darwin-arm64": "0.30.1-beta.1",
|
|
106
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.30.1-beta.1",
|
|
107
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.30.1-beta.1",
|
|
108
|
+
"@lancedb/lancedb-linux-x64-musl": "0.30.1-beta.1",
|
|
109
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.30.1-beta.1",
|
|
110
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.30.1-beta.1",
|
|
111
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.30.1-beta.1"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"apache-arrow": ">=15.0.0 <=18.1.0"
|