@lancedb/lancedb 0.37.1 → 0.38.0-beta.12
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/arrow.d.ts +4 -1
- package/dist/arrow.js +35 -282
- package/dist/arrow_type.d.ts +9 -0
- package/dist/arrow_type.js +29 -0
- package/dist/connection.d.ts +104 -2
- package/dist/connection.js +26 -0
- package/dist/embedding/index.d.ts +11 -1
- package/dist/embedding/index.js +24 -17
- package/dist/embedding/openai.js +3 -15
- package/dist/embedding/registry.d.ts +21 -1
- package/dist/embedding/registry.js +76 -20
- package/dist/embedding/transformers.js +3 -15
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -1
- package/dist/materialized_view.d.ts +69 -0
- package/dist/materialized_view.js +112 -0
- package/dist/native.d.ts +121 -2
- package/dist/native.js +52 -52
- package/dist/query.d.ts +38 -2
- package/dist/query.js +154 -101
- package/dist/sanitize.js +10 -4
- package/dist/schema.d.ts +16 -0
- package/dist/schema.js +387 -0
- package/dist/table.d.ts +170 -27
- package/dist/table.js +55 -15
- package/package.json +8 -8
package/dist/native.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class Branches {
|
|
|
12
12
|
checkout(name: string, version?: number | undefined | null): Promise<Table>
|
|
13
13
|
delete(name: string): Promise<void>
|
|
14
14
|
diff(fromBranch: string): Promise<Record<string, unknown>>
|
|
15
|
-
|
|
15
|
+
cherryPick(fromBranch: string, dryRun?: boolean | undefined | null): Promise<Record<string, unknown>>
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export declare class Connection {
|
|
@@ -25,6 +25,8 @@ export declare class Connection {
|
|
|
25
25
|
close(): void
|
|
26
26
|
/** List all tables in the dataset. */
|
|
27
27
|
tableNames(namespacePath?: Array<string> | undefined | null, startAfter?: string | undefined | null, limit?: number | undefined | null): Promise<Array<string>>
|
|
28
|
+
/** List a page of tables in the database. */
|
|
29
|
+
listTables(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null): Promise<ListTablesResponse>
|
|
28
30
|
/**
|
|
29
31
|
* Create table from a Apache Arrow IPC (file) buffer.
|
|
30
32
|
*
|
|
@@ -34,10 +36,15 @@ export declare class Connection {
|
|
|
34
36
|
*/
|
|
35
37
|
createTable(name: string, buf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
|
|
36
38
|
createEmptyTable(name: string, schemaBuf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
|
|
39
|
+
createMaterializedView(name: string, source: string, projections?: Array<Array<string>> | undefined | null, filter?: string | undefined | null, limit?: number | undefined | null): Promise<Table>
|
|
40
|
+
openMaterializedView(name: string): Promise<Table>
|
|
41
|
+
listMaterializedViews(): Promise<Array<string>>
|
|
37
42
|
openTable(name: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
|
|
38
43
|
cloneTable(targetTableName: string, sourceUri: string, targetNamespacePath: Array<string> | undefined | null, sourceVersion: number | undefined | null, sourceTag: string | undefined | null, isShallow: boolean): Promise<Table>
|
|
39
44
|
/** Drop table with the name. Or raise an error if the table does not exist. */
|
|
40
45
|
dropTable(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
|
|
46
|
+
/** Start dropping a table and return its cleanup job. */
|
|
47
|
+
dropTableAsync(name: string, namespacePath?: Array<string> | undefined | null): Promise<Job>
|
|
41
48
|
dropAllTables(namespacePath?: Array<string> | undefined | null): Promise<void>
|
|
42
49
|
/**
|
|
43
50
|
* A `Job` handle for a server-side job by id.
|
|
@@ -275,10 +282,16 @@ export declare class Table {
|
|
|
275
282
|
latestStorageOptions(): Promise<Record<string, string> | null>
|
|
276
283
|
update(onlyIf: string | undefined | null, columns: Array<[string, string]>): Promise<UpdateResult>
|
|
277
284
|
query(): Query
|
|
285
|
+
/** Return a read-only table handle pinned to the current query revision. */
|
|
286
|
+
querySnapshot(): Promise<Table>
|
|
278
287
|
takeOffsets(offsets: Array<number>): TakeQuery
|
|
279
288
|
takeRowIds(rowIds: Array<bigint>): TakeQuery
|
|
280
289
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
281
290
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
291
|
+
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
292
|
+
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
293
|
+
refreshColumnAsync(column: string): Promise<Job>
|
|
294
|
+
refreshMaterializedView(full?: boolean | undefined | null, sourceVersion?: number | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
282
295
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
283
296
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
284
297
|
updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
|
|
@@ -288,7 +301,12 @@ export declare class Table {
|
|
|
288
301
|
unsetLsmWriteSpec(): Promise<void>
|
|
289
302
|
getLsmWriteSpec(): Promise<LsmWriteSpec | null>
|
|
290
303
|
closeLsmWriters(): Promise<void>
|
|
304
|
+
flushLsm(): Promise<void>
|
|
305
|
+
compactLsm(): Promise<void>
|
|
306
|
+
checkpointLsm(): Promise<void>
|
|
307
|
+
getLsmStats(includeGenerationRows: boolean): Promise<LsmStats | null>
|
|
291
308
|
version(): Promise<number>
|
|
309
|
+
checkoutCurrent(): Promise<Table>
|
|
292
310
|
checkout(version: number): Promise<void>
|
|
293
311
|
checkoutTag(tag: string): Promise<void>
|
|
294
312
|
checkoutLatest(): Promise<void>
|
|
@@ -384,6 +402,45 @@ export interface AlterColumnsResult {
|
|
|
384
402
|
version: number
|
|
385
403
|
}
|
|
386
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Live state of one bucket. A table is N buckets on one node; flattening to a
|
|
407
|
+
* single number hides the one hot bucket that is usually why someone opened
|
|
408
|
+
* this endpoint.
|
|
409
|
+
*/
|
|
410
|
+
export interface BucketStats {
|
|
411
|
+
/** The shard this bucket writes. */
|
|
412
|
+
shardId: string
|
|
413
|
+
/** `"Active"` or `"Sealed"` (drop-table 2PC in flight). */
|
|
414
|
+
status: string
|
|
415
|
+
/** Epoch of the writer that currently owns the shard. */
|
|
416
|
+
writerEpoch: number
|
|
417
|
+
/** Version of the shard manifest these numbers were read from. */
|
|
418
|
+
manifestVersion: number
|
|
419
|
+
/** The generation the active memtable will become. */
|
|
420
|
+
currentGeneration: number
|
|
421
|
+
/** WAL position replay resumes from. */
|
|
422
|
+
replayAfterWalEntryPosition: number
|
|
423
|
+
/**
|
|
424
|
+
* Highest WAL position the writer has seen. The difference against
|
|
425
|
+
* `replayAfterWalEntryPosition` is the WAL lag.
|
|
426
|
+
*/
|
|
427
|
+
walEntryPositionLastSeen: number
|
|
428
|
+
/** Flushed L0 generations not yet merged into the base table. */
|
|
429
|
+
generations: Array<GenerationStats>
|
|
430
|
+
/**
|
|
431
|
+
* Whether a pass owns this bucket's compaction latch right now. Says *a*
|
|
432
|
+
* driver is running, not *whose*, and the latch is held from dispatch —
|
|
433
|
+
* including while the pass queues for a pod-wide compactor permit. Read it
|
|
434
|
+
* as "do not pile on", never as "mine is progressing".
|
|
435
|
+
*/
|
|
436
|
+
compacting: boolean
|
|
437
|
+
/**
|
|
438
|
+
* Oldest first, active last. Absent for a `"Sealed"` bucket, whose
|
|
439
|
+
* in-memory state is torn down.
|
|
440
|
+
*/
|
|
441
|
+
memtables?: Array<MemtableStats>
|
|
442
|
+
}
|
|
443
|
+
|
|
387
444
|
export interface ClientConfig {
|
|
388
445
|
userAgent?: string
|
|
389
446
|
retryConfig?: RetryConfig
|
|
@@ -616,6 +673,19 @@ export interface FtsToken {
|
|
|
616
673
|
position: number
|
|
617
674
|
}
|
|
618
675
|
|
|
676
|
+
/** One flushed L0 generation. */
|
|
677
|
+
export interface GenerationStats {
|
|
678
|
+
/** The generation number. Increases as memtables are sealed into L0. */
|
|
679
|
+
generation: number
|
|
680
|
+
/** On-disk size of the generation. */
|
|
681
|
+
bytes: number
|
|
682
|
+
/**
|
|
683
|
+
* Present only when `includeGenerationRows` was requested. Off by default
|
|
684
|
+
* because each count opens an uncached Lance dataset.
|
|
685
|
+
*/
|
|
686
|
+
rows?: number
|
|
687
|
+
}
|
|
688
|
+
|
|
619
689
|
/** A description of an index currently configured on a column */
|
|
620
690
|
export interface IndexConfig {
|
|
621
691
|
/** The name of the index */
|
|
@@ -751,6 +821,22 @@ export interface ListNamespacesResponse {
|
|
|
751
821
|
pageToken?: string
|
|
752
822
|
}
|
|
753
823
|
|
|
824
|
+
export interface ListTablesResponse {
|
|
825
|
+
tables: Array<string>
|
|
826
|
+
pageToken?: string
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Live per-bucket LSM state, as returned by `Table#getLsmStats`.
|
|
831
|
+
*
|
|
832
|
+
* Nothing here is derived: sums and differences (total L0 bytes, WAL lag) are
|
|
833
|
+
* the caller's to compute.
|
|
834
|
+
*/
|
|
835
|
+
export interface LsmStats {
|
|
836
|
+
/** One entry per bucket backing this table. */
|
|
837
|
+
buckets: Array<BucketStats>
|
|
838
|
+
}
|
|
839
|
+
|
|
754
840
|
/**
|
|
755
841
|
* Specification selecting Lance's MemWAL LSM-style write path for
|
|
756
842
|
* `mergeInsert`.
|
|
@@ -766,12 +852,32 @@ export interface LsmWriteSpec {
|
|
|
766
852
|
column?: string
|
|
767
853
|
/** Bucket variant: the number of buckets, in `[1, 1024]`. */
|
|
768
854
|
numBuckets?: number
|
|
769
|
-
/**
|
|
855
|
+
/**
|
|
856
|
+
* Indexes the MemWAL keeps up to date. Omitted resolves every
|
|
857
|
+
* maintainable index on install; an empty array means none.
|
|
858
|
+
*/
|
|
770
859
|
maintainedIndexes?: Array<string>
|
|
771
860
|
/** Default `ShardWriter` configuration recorded in the MemWAL index. */
|
|
772
861
|
writerConfigDefaults?: Record<string, string>
|
|
773
862
|
}
|
|
774
863
|
|
|
864
|
+
/** One in-memory memtable. */
|
|
865
|
+
export interface MemtableStats {
|
|
866
|
+
/** The generation this memtable will become once sealed. */
|
|
867
|
+
generation: number
|
|
868
|
+
/** Rows currently buffered. */
|
|
869
|
+
rows: number
|
|
870
|
+
/** Estimated in-memory size. */
|
|
871
|
+
bytes: number
|
|
872
|
+
/** Record batches currently buffered. */
|
|
873
|
+
batches: number
|
|
874
|
+
/**
|
|
875
|
+
* Names of the indexes this memtable carries. An absent name is the whole
|
|
876
|
+
* answer to "why is my fresh-tier search on that column brute-force".
|
|
877
|
+
*/
|
|
878
|
+
indexes: Array<string>
|
|
879
|
+
}
|
|
880
|
+
|
|
775
881
|
export interface MergeResult {
|
|
776
882
|
version: number
|
|
777
883
|
numInsertedRows: number
|
|
@@ -862,6 +968,19 @@ export interface OptimizeStats {
|
|
|
862
968
|
/** Create a permutation builder for the given table */
|
|
863
969
|
export declare function permutationBuilder(table: Table): PermutationBuilder
|
|
864
970
|
|
|
971
|
+
export interface RefreshColumnResult {
|
|
972
|
+
rowsFilled: number
|
|
973
|
+
version: number
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export interface RefreshMaterializedViewResult {
|
|
977
|
+
/** How the view was brought up to date: "rebuild", "incremental" or "no_op". */
|
|
978
|
+
mode: string
|
|
979
|
+
rowsWritten: number
|
|
980
|
+
sourceVersion: number
|
|
981
|
+
version: number
|
|
982
|
+
}
|
|
983
|
+
|
|
865
984
|
/**
|
|
866
985
|
* Install the LanceDB metrics recorder as the process-global `metrics` recorder.
|
|
867
986
|
*
|
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.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
79
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
98
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
123
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
142
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
162
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
181
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
204
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
222
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
241
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
265
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
284
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
309
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
328
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
349
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
368
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
389
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
408
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
429
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
448
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
469
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
488
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
508
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
527
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
551
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
570
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 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.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
589
|
+
if (bindingPackageVersion !== '0.38.0-beta.12' && 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.38.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/query.d.ts
CHANGED
|
@@ -49,11 +49,17 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
49
49
|
/**
|
|
50
50
|
* @hidden
|
|
51
51
|
*/
|
|
52
|
-
protected constructor(inner
|
|
52
|
+
protected constructor(inner?: NativeQueryType | Promise<NativeQueryType>);
|
|
53
53
|
/**
|
|
54
54
|
* @hidden
|
|
55
55
|
*/
|
|
56
56
|
protected doCall(fn: (inner: NativeQueryType) => void): void;
|
|
57
|
+
/**
|
|
58
|
+
* Return the native query used by the next terminal operation.
|
|
59
|
+
*
|
|
60
|
+
* @hidden
|
|
61
|
+
*/
|
|
62
|
+
protected getInner(): Promise<NativeQueryType>;
|
|
57
63
|
/**
|
|
58
64
|
* Return only the specified columns.
|
|
59
65
|
*
|
|
@@ -175,7 +181,7 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
175
181
|
outputSchema(): Promise<import("./arrow").Schema>;
|
|
176
182
|
}
|
|
177
183
|
export declare class StandardQueryBase<NativeQueryType extends NativeQuery | NativeVectorQuery> extends QueryBase<NativeQueryType> implements ExecutableQuery {
|
|
178
|
-
constructor(inner
|
|
184
|
+
constructor(inner?: NativeQueryType | Promise<NativeQueryType>);
|
|
179
185
|
/**
|
|
180
186
|
* A filter statement to be applied to this query.
|
|
181
187
|
*
|
|
@@ -266,6 +272,10 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
266
272
|
* @hidden
|
|
267
273
|
*/
|
|
268
274
|
constructor(inner: NativeVectorQuery | Promise<NativeVectorQuery>);
|
|
275
|
+
/**
|
|
276
|
+
* @hidden
|
|
277
|
+
*/
|
|
278
|
+
protected doVectorCall(fn: (inner: NativeVectorQuery) => void): void;
|
|
269
279
|
/**
|
|
270
280
|
* Set the number of partitions to search (probe)
|
|
271
281
|
*
|
|
@@ -412,6 +422,13 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
412
422
|
addQueryVector(vector: IntoVector): VectorQuery;
|
|
413
423
|
rerank(reranker: Reranker): VectorQuery;
|
|
414
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* Create a string query whose vector/FTS routing is resolved against the active
|
|
427
|
+
* table schema when the query executes.
|
|
428
|
+
*
|
|
429
|
+
* @hidden
|
|
430
|
+
*/
|
|
431
|
+
export declare function createAutoQuery(table: NativeTable, query: string, columns: string[] | null, getVector: (metadata: string) => Promise<Awaited<IntoVector>>): AutoQuery;
|
|
415
432
|
/**
|
|
416
433
|
* A query that returns a subset of the rows in the table.
|
|
417
434
|
*
|
|
@@ -430,6 +447,25 @@ export declare class TakeQuery extends QueryBase<NativeTakeQuery> {
|
|
|
430
447
|
*/
|
|
431
448
|
useLsm(enable: boolean): this;
|
|
432
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* A builder for automatic string searches.
|
|
452
|
+
*
|
|
453
|
+
* Automatic search determines whether to use full-text or vector search from
|
|
454
|
+
* the table revision selected for each execution. This builder exposes the
|
|
455
|
+
* common operations supported by both query families.
|
|
456
|
+
*
|
|
457
|
+
* @hideconstructor
|
|
458
|
+
*/
|
|
459
|
+
export declare class AutoQuery extends StandardQueryBase<NativeQuery | NativeVectorQuery> {
|
|
460
|
+
private readonly createInner;
|
|
461
|
+
private readonly calls;
|
|
462
|
+
/** @hidden */
|
|
463
|
+
constructor(createInner: () => Promise<NativeQuery | NativeVectorQuery>);
|
|
464
|
+
/** @hidden */
|
|
465
|
+
protected doCall(fn: (inner: NativeQuery | NativeVectorQuery) => void): void;
|
|
466
|
+
/** @hidden */
|
|
467
|
+
protected getInner(): Promise<NativeQuery | NativeVectorQuery>;
|
|
468
|
+
}
|
|
433
469
|
/** A builder for LanceDB queries.
|
|
434
470
|
*
|
|
435
471
|
* @see {@link Table#query}, {@link Table#search}
|