@lancedb/lancedb 0.41.0-beta.8 → 0.42.0-beta.0
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/CONTRIBUTING.md +13 -0
- package/dist/arrow.d.ts +1 -0
- package/dist/arrow.js +16 -5
- package/dist/blob.d.ts +25 -2
- package/dist/blob.js +56 -5
- package/dist/catalog.d.ts +6 -1
- package/dist/catalog.js +6 -2
- package/dist/connection.d.ts +36 -89
- package/dist/connection.js +28 -26
- package/dist/embedding/transformers.js +4 -2
- package/dist/expr.d.ts +64 -0
- package/dist/expr.js +148 -0
- package/dist/header.d.ts +1 -1
- package/dist/header.js +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +17 -6
- package/dist/indices.d.ts +86 -8
- package/dist/indices.js +6 -6
- package/dist/job.d.ts +8 -5
- package/dist/job.js +8 -5
- package/dist/materialized_view.d.ts +7 -3
- package/dist/materialized_view.js +7 -4
- package/dist/merge.d.ts +7 -7
- package/dist/merge.js +8 -8
- package/dist/native.d.ts +139 -98
- package/dist/native.js +59 -52
- package/dist/query.d.ts +26 -18
- package/dist/query.js +88 -38
- package/dist/table.d.ts +73 -58
- package/dist/table.js +18 -18
- package/package.json +10 -9
|
@@ -131,14 +131,17 @@ class MaterializedView {
|
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Recompute the view from its source.
|
|
134
|
+
* Local refresh requires a source build with `experimental-functions`.
|
|
134
135
|
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
136
|
+
* `full: true` forces a remote rebuild; otherwise the server chooses the
|
|
137
|
+
* refresh mode. Local views always rebuild, and `sourceVersion` selects a
|
|
138
|
+
* source version instead of the latest. Remote SQL refreshes do not support
|
|
139
|
+
* source-version pinning. Their results leave `mode`, `rowsWritten`, and
|
|
140
|
+
* `sourceVersion` absent because the SQL job adapter does not expose these metrics.
|
|
138
141
|
*/
|
|
139
142
|
async refresh(options) {
|
|
140
143
|
validateNonNegativeInteger(options?.sourceVersion, "sourceVersion");
|
|
141
|
-
return await this.inner.refreshMaterializedView(options?.sourceVersion);
|
|
144
|
+
return await this.inner.refreshMaterializedView(options?.sourceVersion, options?.full);
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
exports.MaterializedView = MaterializedView;
|
package/dist/merge.d.ts
CHANGED
|
@@ -57,25 +57,25 @@ export declare class MergeInsertBuilder {
|
|
|
57
57
|
*/
|
|
58
58
|
useIndex(useIndex: boolean): MergeInsertBuilder;
|
|
59
59
|
/**
|
|
60
|
-
* Control
|
|
60
|
+
* Control RTE routing for this merge.
|
|
61
61
|
*
|
|
62
|
-
* By default (unset), a `mergeInsert` on a table with
|
|
62
|
+
* By default (unset), a `mergeInsert` on a table with an RTE write spec is
|
|
63
63
|
* routed through Lance's MemWAL shard writer, and a table without one uses the
|
|
64
64
|
* standard path.
|
|
65
65
|
*
|
|
66
|
-
* @param enable - `true` forces
|
|
67
|
-
*
|
|
66
|
+
* @param enable - `true` forces RTE routing and errors if the table has no
|
|
67
|
+
* RTE write spec. `false` forces the standard write path even when a spec is set.
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
useRTE(enable: boolean): MergeInsertBuilder;
|
|
70
70
|
/**
|
|
71
71
|
* Controls how an LSM merge checks that its input targets a single shard.
|
|
72
72
|
*
|
|
73
|
-
* When a table has
|
|
73
|
+
* When a table has an RTE write spec, every row in a `mergeInsert` call must
|
|
74
74
|
* route to the same shard. When `true` (the default), every row is inspected
|
|
75
75
|
* to verify this. When `false`, only the first row is inspected and the
|
|
76
76
|
* shard it routes to is used for the whole input — a faster path for callers
|
|
77
77
|
* that have already pre-sharded their input. Has no effect on tables without
|
|
78
|
-
*
|
|
78
|
+
* an RTE write spec.
|
|
79
79
|
*
|
|
80
80
|
* @param validateSingleShard - Whether to check every row routes to one shard. Defaults to `true`.
|
|
81
81
|
*/
|
package/dist/merge.js
CHANGED
|
@@ -69,27 +69,27 @@ class MergeInsertBuilder {
|
|
|
69
69
|
return new MergeInsertBuilder(this.#native.useIndex(useIndex), this.#schema);
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* Control
|
|
72
|
+
* Control RTE routing for this merge.
|
|
73
73
|
*
|
|
74
|
-
* By default (unset), a `mergeInsert` on a table with
|
|
74
|
+
* By default (unset), a `mergeInsert` on a table with an RTE write spec is
|
|
75
75
|
* routed through Lance's MemWAL shard writer, and a table without one uses the
|
|
76
76
|
* standard path.
|
|
77
77
|
*
|
|
78
|
-
* @param enable - `true` forces
|
|
79
|
-
*
|
|
78
|
+
* @param enable - `true` forces RTE routing and errors if the table has no
|
|
79
|
+
* RTE write spec. `false` forces the standard write path even when a spec is set.
|
|
80
80
|
*/
|
|
81
|
-
|
|
82
|
-
return new MergeInsertBuilder(this.#native.
|
|
81
|
+
useRTE(enable) {
|
|
82
|
+
return new MergeInsertBuilder(this.#native.useRTE(enable), this.#schema);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Controls how an LSM merge checks that its input targets a single shard.
|
|
86
86
|
*
|
|
87
|
-
* When a table has
|
|
87
|
+
* When a table has an RTE write spec, every row in a `mergeInsert` call must
|
|
88
88
|
* route to the same shard. When `true` (the default), every row is inspected
|
|
89
89
|
* to verify this. When `false`, only the first row is inspected and the
|
|
90
90
|
* shard it routes to is used for the whole input — a faster path for callers
|
|
91
91
|
* that have already pre-sharded their input. Has no effect on tables without
|
|
92
|
-
*
|
|
92
|
+
* an RTE write spec.
|
|
93
93
|
*
|
|
94
94
|
* @param validateSingleShard - Whether to check every row routes to one shard. Defaults to `true`.
|
|
95
95
|
*/
|
package/dist/native.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class Catalog {
|
|
|
31
31
|
get uri(): string
|
|
32
32
|
createDatabase(name: string, existOk?: boolean | undefined | null): Promise<Connection>
|
|
33
33
|
connectDatabase(name: string): Promise<Connection>
|
|
34
|
-
dropDatabase(name: string, ignoreMissing?: boolean | undefined | null): Promise<void>
|
|
34
|
+
dropDatabase(name: string, ignoreMissing?: boolean | undefined | null, cascade?: boolean | undefined | null): Promise<void>
|
|
35
35
|
listDatabases(pageToken?: string | undefined | null, pageLimit?: number | undefined | null): DatabaseNames
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -45,8 +45,8 @@ export declare class Connection {
|
|
|
45
45
|
close(): void
|
|
46
46
|
/** List all tables in the dataset. */
|
|
47
47
|
tableNames(namespacePath?: Array<string> | undefined | null, startAfter?: string | undefined | null, limit?: number | undefined | null): Promise<Array<string>>
|
|
48
|
-
/**
|
|
49
|
-
listTables(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null):
|
|
48
|
+
/** Lazily list tables in the database. */
|
|
49
|
+
listTables(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null): NameListing
|
|
50
50
|
/**
|
|
51
51
|
* Create table from a Apache Arrow IPC (file) buffer.
|
|
52
52
|
*
|
|
@@ -111,8 +111,8 @@ export declare class Connection {
|
|
|
111
111
|
resumeJob(jobId: string): Promise<string>
|
|
112
112
|
/** Describe a namespace and return its properties. */
|
|
113
113
|
describeNamespace(namespacePath: Array<string>): Promise<DescribeNamespaceResponse>
|
|
114
|
-
/**
|
|
115
|
-
listNamespaces(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null):
|
|
114
|
+
/** Lazily list child namespaces under the given namespace path */
|
|
115
|
+
listNamespaces(namespacePath?: Array<string> | undefined | null, pageToken?: string | undefined | null, limit?: number | undefined | null): NameListing
|
|
116
116
|
/** Create a new namespace with optional properties. */
|
|
117
117
|
createNamespace(namespacePath: Array<string>, mode?: string | undefined | null, properties?: Record<string, string> | undefined | null): Promise<CreateNamespaceResponse>
|
|
118
118
|
/** Drop a namespace. */
|
|
@@ -135,24 +135,46 @@ export declare class DatabaseNames {
|
|
|
135
135
|
next(): Promise<string | null>
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
export declare class Expr {
|
|
139
|
+
eq(other: Expr): Expr
|
|
140
|
+
ne(other: Expr): Expr
|
|
141
|
+
lt(other: Expr): Expr
|
|
142
|
+
lte(other: Expr): Expr
|
|
143
|
+
gt(other: Expr): Expr
|
|
144
|
+
gte(other: Expr): Expr
|
|
145
|
+
and(other: Expr): Expr
|
|
146
|
+
or(other: Expr): Expr
|
|
147
|
+
not(): Expr
|
|
148
|
+
add(other: Expr): Expr
|
|
149
|
+
sub(other: Expr): Expr
|
|
150
|
+
mul(other: Expr): Expr
|
|
151
|
+
div(other: Expr): Expr
|
|
152
|
+
lower(): Expr
|
|
153
|
+
upper(): Expr
|
|
154
|
+
contains(substr: Expr): Expr
|
|
155
|
+
isIn(list: Array<Expr>): Expr
|
|
156
|
+
cast(dataType: string): Expr
|
|
157
|
+
toSql(): string
|
|
158
|
+
}
|
|
159
|
+
|
|
138
160
|
export declare class Index {
|
|
139
|
-
static ivfPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
140
|
-
static ivfRq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
141
|
-
static ivfFlat(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
161
|
+
static ivfPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
162
|
+
static ivfRq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
163
|
+
static ivfFlat(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
142
164
|
static btree(): Index
|
|
143
165
|
static bitmap(): Index
|
|
144
166
|
static labelList(): Index
|
|
145
167
|
static fm(): Index
|
|
146
168
|
static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null, blockSize?: number | undefined | null): Index
|
|
147
|
-
static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
|
|
148
|
-
static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
|
|
169
|
+
static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
170
|
+
static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
149
171
|
}
|
|
150
172
|
|
|
151
173
|
/** A handle to an operation that may still be running. */
|
|
152
174
|
export declare class Job {
|
|
153
175
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
176
|
+
* The operation's opaque ID. Interpret registry and query IDs using job_type().
|
|
177
|
+
* Local handles have no ID.
|
|
156
178
|
*/
|
|
157
179
|
get id(): string | null
|
|
158
180
|
/**
|
|
@@ -172,16 +194,16 @@ export declare class Job {
|
|
|
172
194
|
* Ask the backend for this job's current state, and for a server-side job
|
|
173
195
|
* its full record, then cache it for the getters below.
|
|
174
196
|
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
197
|
+
* Registry details are null until this runs; query handles already expose
|
|
198
|
+
* job_type "query". {@link Job.status} fetches the whole registry record too;
|
|
177
199
|
* {@link Job.wait} records only the terminal state it establishes.
|
|
178
200
|
*/
|
|
179
201
|
refresh(): Promise<void>
|
|
180
202
|
/** The last observed lifecycle state, without contacting the backend. */
|
|
181
203
|
get state(): string | null
|
|
182
204
|
/**
|
|
183
|
-
*
|
|
184
|
-
*
|
|
205
|
+
* "query" immediately for SQL-backed handles; otherwise the cached
|
|
206
|
+
* server-reported job type. Null for in-process handles.
|
|
185
207
|
*/
|
|
186
208
|
get jobType(): string | null
|
|
187
209
|
/** When the job was created, in milliseconds since the epoch. */
|
|
@@ -265,7 +287,7 @@ export declare class NativeMergeInsertBuilder {
|
|
|
265
287
|
whenNotMatchedBySourceDelete(filter?: string | undefined | null): NativeMergeInsertBuilder
|
|
266
288
|
setTimeout(timeout: number): void
|
|
267
289
|
useIndex(useIndex: boolean): NativeMergeInsertBuilder
|
|
268
|
-
|
|
290
|
+
useRTE(enable: boolean): NativeMergeInsertBuilder
|
|
269
291
|
validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
|
|
270
292
|
execute(buf: Buffer): Promise<MergeResult>
|
|
271
293
|
}
|
|
@@ -343,7 +365,7 @@ export declare class Query {
|
|
|
343
365
|
nearestToRaw(data: Uint8Array, dtype: string): VectorQuery
|
|
344
366
|
fastSearch(): void
|
|
345
367
|
withRowId(): void
|
|
346
|
-
|
|
368
|
+
useRTE(enable: boolean): void
|
|
347
369
|
orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
|
|
348
370
|
outputSchema(): Promise<Buffer>
|
|
349
371
|
execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null, withRowId?: boolean | undefined | null): Promise<RecordBatchIterator>
|
|
@@ -434,21 +456,21 @@ export declare class Table {
|
|
|
434
456
|
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
435
457
|
refreshColumnAsync(column: string): Promise<Job>
|
|
436
458
|
functionErrors(options?: FunctionErrorsOptions | undefined | null): Promise<FunctionErrors>
|
|
437
|
-
refreshMaterializedView(sourceVersion?: number | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
459
|
+
refreshMaterializedView(sourceVersion?: number | undefined | null, full?: boolean | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
438
460
|
materializedViewDefinition(): Promise<string>
|
|
439
461
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
440
462
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
441
463
|
updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
|
|
442
464
|
dropColumns(columns: Array<string>): Promise<DropColumnsResult>
|
|
443
465
|
setUnenforcedPrimaryKey(columns: Array<string>): Promise<void>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
466
|
+
enableRTE(spec: RTEWriteSpec): Promise<void>
|
|
467
|
+
disableRTE(): Promise<void>
|
|
468
|
+
getRTESpec(): Promise<RTEWriteSpec | null>
|
|
469
|
+
closeRTEWriters(): Promise<void>
|
|
470
|
+
flushRTE(): Promise<void>
|
|
471
|
+
compactRTE(): Promise<void>
|
|
472
|
+
checkpointRTE(): Promise<void>
|
|
473
|
+
getRTEStats(includeSstableRows: boolean): Promise<RTEStats | null>
|
|
452
474
|
version(): Promise<number>
|
|
453
475
|
checkoutCurrent(): Promise<Table>
|
|
454
476
|
checkout(version: number): Promise<void>
|
|
@@ -486,7 +508,7 @@ export declare class TakeQuery {
|
|
|
486
508
|
select(columns: Array<[string, string]>): void
|
|
487
509
|
selectColumns(columns: Array<string>): void
|
|
488
510
|
withRowId(): void
|
|
489
|
-
|
|
511
|
+
useRTE(enable: boolean): void
|
|
490
512
|
outputSchema(): Promise<Buffer>
|
|
491
513
|
execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null, withRowId?: boolean | undefined | null): Promise<RecordBatchIterator>
|
|
492
514
|
explainPlan(verbose: boolean): Promise<string>
|
|
@@ -515,7 +537,7 @@ export declare class VectorQuery {
|
|
|
515
537
|
offset(offset: number): void
|
|
516
538
|
fastSearch(): void
|
|
517
539
|
withRowId(): void
|
|
518
|
-
|
|
540
|
+
useRTE(enable: boolean): void
|
|
519
541
|
rerank(rerankHybrid: (arg: RerankHybridCallbackArgs) => Promise<Buffer>): void
|
|
520
542
|
orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
|
|
521
543
|
outputSchema(): Promise<Buffer>
|
|
@@ -582,7 +604,7 @@ export interface ClientConfig {
|
|
|
582
604
|
/**
|
|
583
605
|
* User identifier for tracking purposes.
|
|
584
606
|
*
|
|
585
|
-
* This is sent as the `x-lancedb-user-id` header in requests to LanceDB
|
|
607
|
+
* This is sent as the `x-lancedb-user-id` header in requests to LanceDB Enterprise.
|
|
586
608
|
* It can be set directly, or via the `LANCEDB_USER_ID` environment variable.
|
|
587
609
|
* Alternatively, set `LANCEDB_USER_ID_ENV_KEY` to specify another environment
|
|
588
610
|
* variable that contains the user ID value.
|
|
@@ -590,6 +612,14 @@ export interface ClientConfig {
|
|
|
590
612
|
userId?: string
|
|
591
613
|
}
|
|
592
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Create a column reference expression.
|
|
617
|
+
*
|
|
618
|
+
* The column name is preserved exactly as given (case-sensitive), so
|
|
619
|
+
* `col("firstName")` correctly references a field named `firstName`.
|
|
620
|
+
*/
|
|
621
|
+
export declare function col(name: string): Expr
|
|
622
|
+
|
|
593
623
|
/**
|
|
594
624
|
* A definition of a column alteration. The alteration changes the column at
|
|
595
625
|
* `path` to have the new name `name`, to be nullable if `nullable` is true,
|
|
@@ -661,47 +691,47 @@ export interface ConnectionOptions {
|
|
|
661
691
|
*/
|
|
662
692
|
readConsistencyInterval?: number
|
|
663
693
|
/**
|
|
664
|
-
* (For LanceDB
|
|
694
|
+
* (For LanceDB Embedded only): configuration for object storage.
|
|
665
695
|
*
|
|
666
696
|
* The available options are described at https://docs.lancedb.com/storage/
|
|
667
697
|
*/
|
|
668
698
|
storageOptions?: Record<string, string>
|
|
669
699
|
/**
|
|
670
|
-
* (For LanceDB
|
|
700
|
+
* (For LanceDB Embedded only): use directory namespace manifests as the source
|
|
671
701
|
* of truth for table metadata. Existing directory-listed root tables are
|
|
672
702
|
* migrated into the manifest on access.
|
|
673
703
|
*/
|
|
674
704
|
manifestEnabled?: boolean
|
|
675
705
|
/**
|
|
676
|
-
* (For LanceDB
|
|
706
|
+
* (For LanceDB Embedded only): extra properties for the backing namespace
|
|
677
707
|
* client used by manifest-enabled native connections.
|
|
678
708
|
*/
|
|
679
709
|
namespaceClientProperties?: Record<string, string>
|
|
680
710
|
/**
|
|
681
|
-
* (For LanceDB
|
|
711
|
+
* (For LanceDB Embedded only): the session to use for this connection. Holds
|
|
682
712
|
* shared caches and other session-specific state.
|
|
683
713
|
*/
|
|
684
714
|
session?: Session
|
|
685
|
-
/** (For LanceDB
|
|
715
|
+
/** (For LanceDB Enterprise or LanceDB Cloud only): configuration for the HTTP client. */
|
|
686
716
|
clientConfig?: ClientConfig
|
|
687
717
|
/**
|
|
688
|
-
* (For LanceDB
|
|
718
|
+
* (For LanceDB Enterprise or LanceDB Cloud only): the API key to use.
|
|
689
719
|
*
|
|
690
720
|
* Can also be set via the environment variable `LANCEDB_API_KEY`.
|
|
691
721
|
*/
|
|
692
722
|
apiKey?: string
|
|
693
723
|
/**
|
|
694
|
-
* (For LanceDB
|
|
724
|
+
* (For LanceDB Cloud only): the region to use for LanceDB Cloud (legacy).
|
|
695
725
|
* Defaults to 'us-east-1'.
|
|
696
726
|
*/
|
|
697
727
|
region?: string
|
|
698
728
|
/**
|
|
699
|
-
* (For LanceDB
|
|
700
|
-
*
|
|
729
|
+
* (For LanceDB Enterprise only): the host of the LanceDB Enterprise
|
|
730
|
+
* deployment to connect to.
|
|
701
731
|
*/
|
|
702
732
|
hostOverride?: string
|
|
703
733
|
/**
|
|
704
|
-
* (For LanceDB
|
|
734
|
+
* (For LanceDB Enterprise only): OAuth configuration for IdP-based
|
|
705
735
|
* authentication (e.g., Azure Entra ID). When set, token acquisition
|
|
706
736
|
* and refresh are handled entirely in Rust. TypeScript users should pass
|
|
707
737
|
* the public `OAuthConfig` type exported from `@lancedb/lancedb`.
|
|
@@ -756,6 +786,9 @@ export interface DropNamespaceResponse {
|
|
|
756
786
|
transactionId?: Array<string>
|
|
757
787
|
}
|
|
758
788
|
|
|
789
|
+
/** Whether this native binding was built with local experimental Functions. */
|
|
790
|
+
export declare function experimentalFunctionsEnabled(): boolean
|
|
791
|
+
|
|
759
792
|
/**
|
|
760
793
|
* A per-field metadata update, addressed by dot-path. Merges into the field's
|
|
761
794
|
* existing metadata by default; a `null` value deletes a key, and `replace`
|
|
@@ -804,6 +837,9 @@ export interface FtsToken {
|
|
|
804
837
|
position: number
|
|
805
838
|
}
|
|
806
839
|
|
|
840
|
+
/** Call an arbitrary registered SQL function by name. */
|
|
841
|
+
export declare function func(name: string, args: Array<Expr>): Expr
|
|
842
|
+
|
|
807
843
|
/**
|
|
808
844
|
* A fragment whose per-row error detail was capped: `rowsSkipped` rows
|
|
809
845
|
* failed, of which only `rowsRecorded` have a record of their own.
|
|
@@ -869,56 +905,56 @@ export interface IndexConfig {
|
|
|
869
905
|
/**
|
|
870
906
|
* The UUID of the first segment of the index.
|
|
871
907
|
*
|
|
872
|
-
* `undefined`
|
|
908
|
+
* `undefined` in LanceDB Distributed, which does not yet surface this.
|
|
873
909
|
*/
|
|
874
910
|
indexUuid?: string
|
|
875
911
|
/**
|
|
876
912
|
* The protobuf type URL, a precise type identifier for the index.
|
|
877
913
|
*
|
|
878
|
-
* `undefined`
|
|
914
|
+
* `undefined` in LanceDB Distributed.
|
|
879
915
|
*/
|
|
880
916
|
typeUrl?: string
|
|
881
917
|
/**
|
|
882
918
|
* When the index was created.
|
|
883
919
|
*
|
|
884
|
-
* `undefined`
|
|
920
|
+
* `undefined` in LanceDB Distributed or indices created before timestamps were tracked.
|
|
885
921
|
*/
|
|
886
922
|
createdAt?: Date
|
|
887
923
|
/**
|
|
888
924
|
* The number of rows indexed, across all segments.
|
|
889
925
|
*
|
|
890
|
-
* `undefined`
|
|
926
|
+
* May be `undefined` in LanceDB Distributed if the server does not report it.
|
|
891
927
|
*/
|
|
892
928
|
numIndexedRows?: number
|
|
893
929
|
/**
|
|
894
930
|
* The number of rows not yet covered by this index.
|
|
895
931
|
*
|
|
896
|
-
* `undefined`
|
|
932
|
+
* May be `undefined` in LanceDB Distributed if the server does not report it.
|
|
897
933
|
*/
|
|
898
934
|
numUnindexedRows?: number
|
|
899
935
|
/**
|
|
900
936
|
* The total size in bytes of all index files across all segments.
|
|
901
937
|
*
|
|
902
|
-
* `undefined`
|
|
938
|
+
* `undefined` in LanceDB Distributed or indices without size tracking.
|
|
903
939
|
*/
|
|
904
940
|
sizeBytes?: number
|
|
905
941
|
/**
|
|
906
942
|
* The number of segments that make up the index.
|
|
907
943
|
*
|
|
908
|
-
* `undefined`
|
|
944
|
+
* `undefined` in LanceDB Distributed.
|
|
909
945
|
*/
|
|
910
946
|
numSegments?: number
|
|
911
947
|
/**
|
|
912
948
|
* The on-disk index format version.
|
|
913
949
|
*
|
|
914
|
-
* `undefined`
|
|
950
|
+
* `undefined` in LanceDB Distributed.
|
|
915
951
|
*/
|
|
916
952
|
indexVersion?: number
|
|
917
953
|
/**
|
|
918
954
|
* Index-type-specific details parsed as a JavaScript object.
|
|
919
955
|
*
|
|
920
|
-
* Falls back to a raw string if JSON parsing fails. `undefined`
|
|
921
|
-
*
|
|
956
|
+
* Falls back to a raw string if JSON parsing fails. `undefined` in
|
|
957
|
+
* LanceDB Distributed or when details are unavailable.
|
|
922
958
|
*/
|
|
923
959
|
indexDetails?: any
|
|
924
960
|
}
|
|
@@ -966,15 +1002,14 @@ export interface JobInfo {
|
|
|
966
1002
|
/** The catalog of described LanceDB metrics. Empty until the recorder is installed. */
|
|
967
1003
|
export declare function lancedbMetricsCatalog(): Array<MetricDescription>
|
|
968
1004
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
pageToken?: string
|
|
972
|
-
}
|
|
1005
|
+
/** Create a literal (constant) value expression. */
|
|
1006
|
+
export declare function lit(value: string | number): Expr
|
|
973
1007
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1008
|
+
/** Create a literal boolean value expression. */
|
|
1009
|
+
export declare function litBool(value: boolean): Expr
|
|
1010
|
+
|
|
1011
|
+
/** Create a literal integer value expression. */
|
|
1012
|
+
export declare function litInt(value: number): Expr
|
|
978
1013
|
|
|
979
1014
|
/** One in-memory memtable. */
|
|
980
1015
|
export interface MemtableStats {
|
|
@@ -993,41 +1028,6 @@ export interface MemtableStats {
|
|
|
993
1028
|
indexes: Array<string>
|
|
994
1029
|
}
|
|
995
1030
|
|
|
996
|
-
/**
|
|
997
|
-
* Live per-table-shard MemWAL state, as returned by `Table#getMemWalStats`.
|
|
998
|
-
*
|
|
999
|
-
* Nothing here is derived: sums and differences (total SSTable bytes, WAL lag) are
|
|
1000
|
-
* the caller's to compute.
|
|
1001
|
-
*/
|
|
1002
|
-
export interface MemWalStats {
|
|
1003
|
-
/** One entry per table shard backing this table. */
|
|
1004
|
-
tableShards: Array<TableShardStats>
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* Specification selecting Lance's MemWAL LSM-style write path for
|
|
1009
|
-
* `mergeInsert`.
|
|
1010
|
-
*
|
|
1011
|
-
* `specType` must be `"bucket"`, `"identity"`, or `"unsharded"`. For
|
|
1012
|
-
* `"bucket"`, `column` and `numBuckets` are required; for `"identity"`,
|
|
1013
|
-
* `column` is required.
|
|
1014
|
-
*/
|
|
1015
|
-
export interface MemWalWriteSpec {
|
|
1016
|
-
/** One of `"bucket"`, `"identity"`, or `"unsharded"`. */
|
|
1017
|
-
specType: string
|
|
1018
|
-
/** Bucket and identity variants: the sharding column. */
|
|
1019
|
-
column?: string
|
|
1020
|
-
/** Bucket variant: the number of buckets, in `[1, 1024]`. */
|
|
1021
|
-
numBuckets?: number
|
|
1022
|
-
/**
|
|
1023
|
-
* Indexes the MemWAL keeps up to date. Omitted resolves every
|
|
1024
|
-
* maintainable index on install; an empty array means none.
|
|
1025
|
-
*/
|
|
1026
|
-
maintainedIndexes?: Array<string>
|
|
1027
|
-
/** Default `ShardWriter` configuration recorded in the MemWAL index. */
|
|
1028
|
-
writerConfigDefaults?: Record<string, string>
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
1031
|
export interface MergeResult {
|
|
1032
1032
|
version: number
|
|
1033
1033
|
numInsertedRows: number
|
|
@@ -1149,10 +1149,12 @@ export interface RefreshColumnResult {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
export interface RefreshMaterializedViewResult {
|
|
1152
|
-
/** How the view was brought up to date: "rebuild". */
|
|
1153
|
-
mode
|
|
1154
|
-
|
|
1155
|
-
|
|
1152
|
+
/** How the view was brought up to date: "rebuild", or absent for LanceDB Distributed SQL refreshes. */
|
|
1153
|
+
mode?: string
|
|
1154
|
+
/** Rows written by this refresh, or absent for LanceDB Distributed SQL refreshes. */
|
|
1155
|
+
rowsWritten?: number
|
|
1156
|
+
/** Source version refreshed to, or absent for LanceDB Distributed SQL refreshes. */
|
|
1157
|
+
sourceVersion?: number
|
|
1156
1158
|
version: number
|
|
1157
1159
|
}
|
|
1158
1160
|
|
|
@@ -1220,7 +1222,7 @@ export interface RetryConfig {
|
|
|
1220
1222
|
backoffJitter?: number
|
|
1221
1223
|
/**
|
|
1222
1224
|
* The HTTP status codes for which to retry the request. Default is
|
|
1223
|
-
* [429, 500, 502, 503].
|
|
1225
|
+
* [409, 429, 500, 502, 503, 504].
|
|
1224
1226
|
*
|
|
1225
1227
|
* You can also set this via the environment variable
|
|
1226
1228
|
* `LANCE_CLIENT_RETRY_STATUSES`. Use a comma-separated list of integers.
|
|
@@ -1228,6 +1230,41 @@ export interface RetryConfig {
|
|
|
1228
1230
|
statuses?: Array<number>
|
|
1229
1231
|
}
|
|
1230
1232
|
|
|
1233
|
+
/**
|
|
1234
|
+
* Live per-table-shard RTE state, as returned by `Table#getRTEStats`.
|
|
1235
|
+
*
|
|
1236
|
+
* Nothing here is derived: sums and differences (total SSTable bytes, WAL lag) are
|
|
1237
|
+
* the caller's to compute.
|
|
1238
|
+
*/
|
|
1239
|
+
export interface RTEStats {
|
|
1240
|
+
/** One entry per table shard backing this table. */
|
|
1241
|
+
tableShards: Array<TableShardStats>
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Specification enabling the realtime engine (RTE), which routes
|
|
1246
|
+
* `mergeInsert` through Lance's MemWAL LSM-style write path.
|
|
1247
|
+
*
|
|
1248
|
+
* `specType` must be `"bucket"`, `"identity"`, or `"unsharded"`. For
|
|
1249
|
+
* `"bucket"`, `column` and `numBuckets` are required; for `"identity"`,
|
|
1250
|
+
* `column` is required.
|
|
1251
|
+
*/
|
|
1252
|
+
export interface RTEWriteSpec {
|
|
1253
|
+
/** One of `"bucket"`, `"identity"`, or `"unsharded"`. */
|
|
1254
|
+
specType: string
|
|
1255
|
+
/** Bucket and identity variants: the sharding column. */
|
|
1256
|
+
column?: string
|
|
1257
|
+
/** Bucket variant: the number of buckets, in `[1, 1024]`. */
|
|
1258
|
+
numBuckets?: number
|
|
1259
|
+
/**
|
|
1260
|
+
* Indexes the RTE keeps up to date. Omitted resolves every
|
|
1261
|
+
* maintainable index on install; an empty array means none.
|
|
1262
|
+
*/
|
|
1263
|
+
maintainedIndexes?: Array<string>
|
|
1264
|
+
/** Default `ShardWriter` configuration recorded in the MemWAL index. */
|
|
1265
|
+
writerConfigDefaults?: Record<string, string>
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1231
1268
|
/** Result of `OAuthSession.logout()`. */
|
|
1232
1269
|
export interface SessionLogout {
|
|
1233
1270
|
/**
|
|
@@ -1401,6 +1438,10 @@ export interface TimeoutConfig {
|
|
|
1401
1438
|
* The timeout for reading data from the server in seconds. Default is 300
|
|
1402
1439
|
* seconds (5 minutes). This can also be set via the environment variable
|
|
1403
1440
|
* `LANCE_CLIENT_READ_TIMEOUT`, as an integer number of seconds.
|
|
1441
|
+
*
|
|
1442
|
+
* This also applies while waiting for response headers during an upload.
|
|
1443
|
+
* A large or slowly produced request body (for example, when creating a
|
|
1444
|
+
* table) may need a longer timeout even if data is still being uploaded.
|
|
1404
1445
|
*/
|
|
1405
1446
|
readTimeout?: number
|
|
1406
1447
|
/**
|