@lancedb/lancedb 0.40.0-beta.11 → 0.40.0-beta.13
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/NODEJS_THIRD_PARTY_LICENSES.md +8 -0
- package/dist/arrow.d.ts +18 -1
- package/dist/arrow.js +182 -13
- package/dist/blob.d.ts +95 -7
- package/dist/blob.js +167 -13
- package/dist/catalog.d.ts +40 -6
- package/dist/catalog.js +58 -9
- package/dist/connection.d.ts +18 -4
- package/dist/connection.js +8 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/materialized_view.d.ts +3 -9
- package/dist/materialized_view.js +4 -9
- package/dist/native.d.ts +40 -13
- package/dist/native.js +53 -52
- package/dist/query.d.ts +7 -1
- package/dist/query.js +12 -15
- package/dist/sanitize.d.ts +19 -18
- package/dist/sanitize.js +78 -11
- package/dist/schema.js +31 -3
- package/dist/table.d.ts +21 -7
- package/dist/table.js +7 -7
- package/dist/util.js +9 -0
- package/package.json +13 -9
package/dist/native.d.ts
CHANGED
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class BlobFile {
|
|
4
4
|
size(): bigint
|
|
5
|
-
read(): Promise<Buffer>
|
|
6
|
-
readRange(start: bigint, end: bigint): Promise<Buffer>
|
|
5
|
+
read(maxBytes?: bigint | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>
|
|
6
|
+
readRange(start: bigint, end: bigint, signal?: AbortSignal | undefined | null): Promise<Buffer>
|
|
7
|
+
readRanges(ranges: Array<BlobRange>, signal?: AbortSignal | undefined | null): Promise<Array<Buffer>>
|
|
8
|
+
seek(position: bigint): Promise<void>
|
|
9
|
+
tell(): Promise<bigint>
|
|
10
|
+
close(): Promise<void>
|
|
11
|
+
isClosed(): boolean
|
|
7
12
|
}
|
|
8
13
|
|
|
9
14
|
export declare class BranchContents {
|
|
@@ -27,7 +32,7 @@ export declare class Catalog {
|
|
|
27
32
|
createDatabase(name: string, existOk?: boolean | undefined | null): Promise<Connection>
|
|
28
33
|
connectDatabase(name: string): Promise<Connection>
|
|
29
34
|
dropDatabase(name: string, ignoreMissing?: boolean | undefined | null): Promise<void>
|
|
30
|
-
listDatabases(
|
|
35
|
+
listDatabases(pageToken?: string | undefined | null, pageLimit?: number | undefined | null): DatabaseNames
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
export declare class Connection {
|
|
@@ -94,6 +99,16 @@ export declare class Connection {
|
|
|
94
99
|
* server accepted the cancellation, false if no such job exists.
|
|
95
100
|
*/
|
|
96
101
|
cancelJob(jobId: string): Promise<boolean>
|
|
102
|
+
/**
|
|
103
|
+
* Pause a server-side job by id: its workers drain and it stays parked
|
|
104
|
+
* until resumed. Returns "pausing", "already_paused", or "committing".
|
|
105
|
+
*/
|
|
106
|
+
pauseJob(jobId: string): Promise<string>
|
|
107
|
+
/**
|
|
108
|
+
* Resume a paused server-side job by id. Returns "resumed",
|
|
109
|
+
* "still_pausing", or "not_paused".
|
|
110
|
+
*/
|
|
111
|
+
resumeJob(jobId: string): Promise<string>
|
|
97
112
|
/** Describe a namespace and return its properties. */
|
|
98
113
|
describeNamespace(namespacePath: Array<string>): Promise<DescribeNamespaceResponse>
|
|
99
114
|
/** List child namespaces under the given namespace path */
|
|
@@ -110,6 +125,16 @@ export declare class Connection {
|
|
|
110
125
|
renameTable(currentName: string, newName: string, currentNamespacePath?: Array<string> | undefined | null, newNamespacePath?: Array<string> | undefined | null): Promise<void>
|
|
111
126
|
}
|
|
112
127
|
|
|
128
|
+
/** A lazy iterator over database names with inspectable pagination state. */
|
|
129
|
+
export declare class DatabaseNames {
|
|
130
|
+
/** Number of names cached without another REST request. */
|
|
131
|
+
numPageResults(): number
|
|
132
|
+
/** Continuation token for the next REST request. */
|
|
133
|
+
pageToken(): string | null
|
|
134
|
+
/** Fetch the next name, returning None when exhausted. */
|
|
135
|
+
next(): Promise<string | null>
|
|
136
|
+
}
|
|
137
|
+
|
|
113
138
|
export declare class Index {
|
|
114
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
|
|
115
140
|
static ivfRq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numBits?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null): Index
|
|
@@ -316,6 +341,8 @@ export declare class Query {
|
|
|
316
341
|
|
|
317
342
|
/** Typescript-style Async Iterator over RecordBatches */
|
|
318
343
|
export declare class RecordBatchIterator {
|
|
344
|
+
/** Return the executed stream's output schema as an Arrow IPC file. */
|
|
345
|
+
schema(): Buffer
|
|
319
346
|
next(): Promise<Buffer | null>
|
|
320
347
|
}
|
|
321
348
|
|
|
@@ -368,7 +395,7 @@ export declare class Table {
|
|
|
368
395
|
close(): void
|
|
369
396
|
/** Return Schema as empty Arrow IPC file. */
|
|
370
397
|
schema(): Promise<Buffer>
|
|
371
|
-
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void): Promise<AddResult>
|
|
398
|
+
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void, allowExternalBlobOutsideBases?: boolean): Promise<AddResult>
|
|
372
399
|
countRows(filter?: string | undefined | null): Promise<number>
|
|
373
400
|
delete(predicate: string): Promise<DeleteResult>
|
|
374
401
|
createIndex(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<void>
|
|
@@ -387,15 +414,15 @@ export declare class Table {
|
|
|
387
414
|
takeOffsets(offsets: Array<number>): TakeQuery
|
|
388
415
|
takeRowIds(rowIds: Array<bigint>): TakeQuery
|
|
389
416
|
blobColumns(): Promise<Array<string>>
|
|
390
|
-
fetchBlobs(column: string, rowIds: Array<bigint
|
|
391
|
-
fetchBlobFiles(column: string, rowIds: Array<bigint
|
|
417
|
+
fetchBlobs(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<Buffer | undefined | null>>
|
|
418
|
+
fetchBlobFiles(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<BlobFile | undefined | null>>
|
|
392
419
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
393
420
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
394
421
|
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
395
422
|
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
396
423
|
refreshColumnAsync(column: string): Promise<Job>
|
|
397
424
|
functionErrors(options?: FunctionErrorsOptions | undefined | null): Promise<FunctionErrors>
|
|
398
|
-
refreshMaterializedView(
|
|
425
|
+
refreshMaterializedView(sourceVersion?: number | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
399
426
|
materializedViewDefinition(): Promise<string>
|
|
400
427
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
401
428
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
@@ -507,6 +534,11 @@ export interface AlterColumnsResult {
|
|
|
507
534
|
version: number
|
|
508
535
|
}
|
|
509
536
|
|
|
537
|
+
export interface BlobRange {
|
|
538
|
+
start: bigint
|
|
539
|
+
end: bigint
|
|
540
|
+
}
|
|
541
|
+
|
|
510
542
|
/**
|
|
511
543
|
* Live state of one bucket. A table is N buckets on one node; flattening to a
|
|
512
544
|
* single number hides the one hot bucket that is usually why someone opened
|
|
@@ -967,11 +999,6 @@ export interface JobInfo {
|
|
|
967
999
|
/** The catalog of described LanceDB metrics. Empty until the recorder is installed. */
|
|
968
1000
|
export declare function lancedbMetricsCatalog(): Array<MetricDescription>
|
|
969
1001
|
|
|
970
|
-
export interface ListDatabasesResponse {
|
|
971
|
-
databases: Array<string>
|
|
972
|
-
pageToken?: string
|
|
973
|
-
}
|
|
974
|
-
|
|
975
1002
|
export interface ListNamespacesResponse {
|
|
976
1003
|
namespaces: Array<string>
|
|
977
1004
|
pageToken?: string
|
|
@@ -1155,7 +1182,7 @@ export interface RefreshColumnResult {
|
|
|
1155
1182
|
}
|
|
1156
1183
|
|
|
1157
1184
|
export interface RefreshMaterializedViewResult {
|
|
1158
|
-
/** How the view was brought up to date: "rebuild"
|
|
1185
|
+
/** How the view was brought up to date: "rebuild". */
|
|
1159
1186
|
mode: string
|
|
1160
1187
|
rowsWritten: number
|
|
1161
1188
|
sourceVersion: 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.40.0-beta.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
79
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 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.40.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.40.0-beta.13' && 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.40.0-beta.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -666,6 +666,7 @@ module.exports.BranchContents = nativeBinding.BranchContents;
|
|
|
666
666
|
module.exports.Branches = nativeBinding.Branches;
|
|
667
667
|
module.exports.Catalog = nativeBinding.Catalog;
|
|
668
668
|
module.exports.Connection = nativeBinding.Connection;
|
|
669
|
+
module.exports.DatabaseNames = nativeBinding.DatabaseNames;
|
|
669
670
|
module.exports.Index = nativeBinding.Index;
|
|
670
671
|
module.exports.Job = nativeBinding.Job;
|
|
671
672
|
module.exports.JsFullTextQuery = nativeBinding.JsFullTextQuery;
|
package/dist/query.d.ts
CHANGED
|
@@ -119,7 +119,11 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
119
119
|
* @hidden
|
|
120
120
|
*/
|
|
121
121
|
[Symbol.asyncIterator](): AsyncIterator<RecordBatch<any>>;
|
|
122
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* Collect the results as an Arrow @see {@link ArrowTable}.
|
|
124
|
+
*
|
|
125
|
+
* Empty results retain the query's output schema.
|
|
126
|
+
*/
|
|
123
127
|
toArrow(options?: Partial<QueryExecutionOptions>): Promise<ArrowTable>;
|
|
124
128
|
/** Collect the results as an array of objects. */
|
|
125
129
|
toArray(options?: Partial<QueryExecutionOptions>): Promise<any[]>;
|
|
@@ -279,6 +283,8 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
279
283
|
/**
|
|
280
284
|
* Set the number of partitions to search (probe)
|
|
281
285
|
*
|
|
286
|
+
* The number of probes must be greater than 0.
|
|
287
|
+
*
|
|
282
288
|
* This argument is only used when the vector column has an IVF PQ index.
|
|
283
289
|
* If there is no index then this value is ignored.
|
|
284
290
|
*
|
package/dist/query.js
CHANGED
|
@@ -21,18 +21,6 @@ async function* RecordBatchIterator(promisedInner) {
|
|
|
21
21
|
yield batches[0];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
class RecordBatchIterable {
|
|
25
|
-
inner;
|
|
26
|
-
options;
|
|
27
|
-
constructor(inner, options) {
|
|
28
|
-
this.inner = inner;
|
|
29
|
-
this.options = options;
|
|
30
|
-
}
|
|
31
|
-
// biome-ignore lint/suspicious/noExplicitAny: skip
|
|
32
|
-
[Symbol.asyncIterator]() {
|
|
33
|
-
return RecordBatchIterator(this.inner.execute(this.options?.maxBatchLength, this.options?.timeoutMs));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
24
|
function nearestToNative(inner, vector) {
|
|
37
25
|
const raw = Array.isArray(vector) ? null : (0, arrow_1.extractVectorBuffer)(vector);
|
|
38
26
|
if (raw) {
|
|
@@ -183,13 +171,20 @@ class QueryBase {
|
|
|
183
171
|
[Symbol.asyncIterator]() {
|
|
184
172
|
return RecordBatchIterator(this.nativeExecute());
|
|
185
173
|
}
|
|
186
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Collect the results as an Arrow @see {@link ArrowTable}.
|
|
176
|
+
*
|
|
177
|
+
* Empty results retain the query's output schema.
|
|
178
|
+
*/
|
|
187
179
|
async toArrow(options) {
|
|
188
180
|
const batches = [];
|
|
189
|
-
const
|
|
190
|
-
for await (const batch of
|
|
181
|
+
const iterator = this.nativeExecute(options);
|
|
182
|
+
for await (const batch of RecordBatchIterator(iterator)) {
|
|
191
183
|
batches.push(batch);
|
|
192
184
|
}
|
|
185
|
+
if (batches.length === 0) {
|
|
186
|
+
return (0, arrow_1.tableFromIPC)((await iterator).schema());
|
|
187
|
+
}
|
|
193
188
|
return new arrow_1.Table(batches);
|
|
194
189
|
}
|
|
195
190
|
/** Collect the results as an array of objects. */
|
|
@@ -415,6 +410,8 @@ class VectorQuery extends StandardQueryBase {
|
|
|
415
410
|
/**
|
|
416
411
|
* Set the number of partitions to search (probe)
|
|
417
412
|
*
|
|
413
|
+
* The number of probes must be greater than 0.
|
|
414
|
+
*
|
|
418
415
|
* This argument is only used when the vector column has an IVF PQ index.
|
|
419
416
|
* If there is no index then this value is ignored.
|
|
420
417
|
*
|
package/dist/sanitize.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import * as arrowModule from "apache-arrow";
|
|
1
2
|
import type { TKeys } from "apache-arrow/type";
|
|
2
|
-
import { DataType,
|
|
3
|
+
import { DataType, DenseUnion, Field, Schema, SchemaLike, SparseUnion, Table, TableLike, TimestampMicrosecond, TimestampMillisecond, TimestampNanosecond, TimestampSecond } from "./arrow";
|
|
3
4
|
export declare function sanitizeMetadata(metadataLike?: unknown): Map<string, string> | undefined;
|
|
4
|
-
export declare function sanitizeInt(typeLike: object): Int<Type.Int | Type.Int8 | Type.Int16 | Type.Int32 | Type.Int64 | Type.Uint8 | Type.Uint16 | Type.Uint32 | Type.Uint64>;
|
|
5
|
-
export declare function sanitizeFloat(typeLike: object): Float<Type.Float | Type.Float16 | Type.Float32 | Type.Float64>;
|
|
6
|
-
export declare function sanitizeDecimal(typeLike: object): Decimal;
|
|
7
|
-
export declare function sanitizeDate(typeLike: object): Date_<import("apache-arrow/type").Dates>;
|
|
8
|
-
export declare function sanitizeTime(typeLike: object): Time<Type.Time | Type.TimeSecond | Type.TimeMillisecond | Type.TimeMicrosecond | Type.TimeNanosecond>;
|
|
9
|
-
export declare function sanitizeTimestamp(typeLike: object): Timestamp<Type.Timestamp | Type.TimestampSecond | Type.TimestampMillisecond | Type.TimestampMicrosecond | Type.TimestampNanosecond>;
|
|
10
|
-
export declare function sanitizeTypedTimestamp(typeLike: object, Datatype: typeof TimestampNanosecond | typeof TimestampMicrosecond | typeof TimestampMillisecond | typeof TimestampSecond):
|
|
11
|
-
export declare function sanitizeInterval(typeLike: object): Interval<Type.Interval | Type.IntervalDayTime | Type.IntervalYearMonth>;
|
|
12
|
-
export declare function sanitizeList(typeLike: object): List<any>;
|
|
13
|
-
export declare function sanitizeStruct(typeLike: object): Struct<any>;
|
|
14
|
-
export declare function sanitizeUnion(typeLike: object): Union<Type.Union | Type.DenseUnion | Type.SparseUnion>;
|
|
15
|
-
export declare function sanitizeTypedUnion(typeLike: object, UnionType: typeof DenseUnion | typeof SparseUnion):
|
|
16
|
-
export declare function sanitizeFixedSizeBinary(typeLike: object): FixedSizeBinary;
|
|
17
|
-
export declare function sanitizeFixedSizeList(typeLike: object): FixedSizeList<any>;
|
|
18
|
-
export declare function sanitizeMap(typeLike: object): Map_<any, any>;
|
|
19
|
-
export declare function sanitizeDuration(typeLike: object): Duration<Type.Duration | Type.DurationSecond | Type.DurationMillisecond | Type.DurationMicrosecond | Type.DurationNanosecond>;
|
|
20
|
-
export declare function sanitizeDictionary(typeLike: object): Dictionary<DataType<Type, any>, TKeys>;
|
|
5
|
+
export declare function sanitizeInt(typeLike: object): arrowModule.Int<arrowModule.Type.Int | arrowModule.Type.Int8 | arrowModule.Type.Int16 | arrowModule.Type.Int32 | arrowModule.Type.Int64 | arrowModule.Type.Uint8 | arrowModule.Type.Uint16 | arrowModule.Type.Uint32 | arrowModule.Type.Uint64>;
|
|
6
|
+
export declare function sanitizeFloat(typeLike: object): arrowModule.Float<arrowModule.Type.Float | arrowModule.Type.Float16 | arrowModule.Type.Float32 | arrowModule.Type.Float64>;
|
|
7
|
+
export declare function sanitizeDecimal(typeLike: object): arrowModule.Decimal;
|
|
8
|
+
export declare function sanitizeDate(typeLike: object): arrowModule.Date_<import("apache-arrow/type").Dates>;
|
|
9
|
+
export declare function sanitizeTime(typeLike: object): arrowModule.Time<arrowModule.Type.Time | arrowModule.Type.TimeSecond | arrowModule.Type.TimeMillisecond | arrowModule.Type.TimeMicrosecond | arrowModule.Type.TimeNanosecond>;
|
|
10
|
+
export declare function sanitizeTimestamp(typeLike: object): arrowModule.Timestamp<arrowModule.Type.Timestamp | arrowModule.Type.TimestampSecond | arrowModule.Type.TimestampMillisecond | arrowModule.Type.TimestampMicrosecond | arrowModule.Type.TimestampNanosecond>;
|
|
11
|
+
export declare function sanitizeTypedTimestamp(typeLike: object, Datatype: typeof TimestampNanosecond | typeof TimestampMicrosecond | typeof TimestampMillisecond | typeof TimestampSecond): arrowModule.TimestampNanosecond | arrowModule.TimestampMicrosecond | arrowModule.TimestampMillisecond | arrowModule.TimestampSecond;
|
|
12
|
+
export declare function sanitizeInterval(typeLike: object): arrowModule.Interval<arrowModule.Type.Interval | arrowModule.Type.IntervalDayTime | arrowModule.Type.IntervalYearMonth | arrowModule.Type.IntervalMonthDayNano>;
|
|
13
|
+
export declare function sanitizeList(typeLike: object): arrowModule.List<any>;
|
|
14
|
+
export declare function sanitizeStruct(typeLike: object): arrowModule.Struct<any>;
|
|
15
|
+
export declare function sanitizeUnion(typeLike: object): arrowModule.Union<arrowModule.Type.Union | arrowModule.Type.DenseUnion | arrowModule.Type.SparseUnion>;
|
|
16
|
+
export declare function sanitizeTypedUnion(typeLike: object, UnionType: typeof DenseUnion | typeof SparseUnion): arrowModule.DenseUnion | arrowModule.SparseUnion;
|
|
17
|
+
export declare function sanitizeFixedSizeBinary(typeLike: object): arrowModule.FixedSizeBinary;
|
|
18
|
+
export declare function sanitizeFixedSizeList(typeLike: object): arrowModule.FixedSizeList<any>;
|
|
19
|
+
export declare function sanitizeMap(typeLike: object): arrowModule.Map_<any, any>;
|
|
20
|
+
export declare function sanitizeDuration(typeLike: object): arrowModule.Duration<arrowModule.Type.Duration | arrowModule.Type.DurationSecond | arrowModule.Type.DurationMillisecond | arrowModule.Type.DurationMicrosecond | arrowModule.Type.DurationNanosecond>;
|
|
21
|
+
export declare function sanitizeDictionary(typeLike: object): arrowModule.Dictionary<arrowModule.DataType<arrowModule.Type, any>, TKeys>;
|
|
21
22
|
export declare function sanitizeType(typeLike: unknown): DataType<any>;
|
|
22
23
|
export declare function sanitizeField(fieldLike: unknown): Field;
|
|
23
24
|
/**
|