@lancedb/lancedb 0.40.0-beta.11 → 0.40.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/blob.d.ts +39 -5
- package/dist/blob.js +61 -7
- package/dist/connection.d.ts +18 -0
- package/dist/connection.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/materialized_view.d.ts +3 -2
- package/dist/materialized_view.js +3 -2
- package/dist/native.d.ts +25 -5
- package/dist/native.js +52 -52
- package/dist/sanitize.js +4 -0
- package/dist/table.d.ts +19 -5
- package/dist/table.js +5 -5
- package/dist/util.js +9 -0
- package/package.json +8 -8
package/dist/blob.d.ts
CHANGED
|
@@ -76,17 +76,51 @@ export declare class BlobFile {
|
|
|
76
76
|
/** Returns the blob size in bytes. */
|
|
77
77
|
size(): bigint;
|
|
78
78
|
/**
|
|
79
|
-
* Reads from the cursor
|
|
79
|
+
* Reads from the cursor and advances the cursor.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
81
|
+
* Reads to the end when `maxBytes` is omitted, or at most `maxBytes` bytes
|
|
82
|
+
* otherwise. Returns an empty buffer at the end of the blob.
|
|
83
|
+
* {@link BlobFile.readRange} does not move the cursor.
|
|
83
84
|
*/
|
|
84
|
-
read(): Promise<Buffer>;
|
|
85
|
+
read(maxBytes?: bigint, options?: BlobReadOptions): Promise<Buffer>;
|
|
85
86
|
/**
|
|
86
87
|
* Reads the half-open byte range `[start, end)`.
|
|
87
88
|
*
|
|
88
89
|
* Fails when `end` is past the blob size. Does not move the cursor.
|
|
89
90
|
*/
|
|
90
|
-
readRange(start: bigint, end: bigint): Promise<Buffer>;
|
|
91
|
+
readRange(start: bigint, end: bigint, options?: BlobReadOptions): Promise<Buffer>;
|
|
92
|
+
/**
|
|
93
|
+
* Reads several half-open byte ranges. Returns one buffer per range, in
|
|
94
|
+
* the order given.
|
|
95
|
+
*
|
|
96
|
+
* Fails when any `end` is past the blob size. Does not move the cursor.
|
|
97
|
+
*/
|
|
98
|
+
readRanges(ranges: BlobRange[], options?: BlobReadOptions): Promise<Buffer[]>;
|
|
99
|
+
/** Moves the cursor to `position`, in bytes from the start of the blob. */
|
|
100
|
+
seek(position: bigint): Promise<void>;
|
|
101
|
+
/** Returns the cursor position in bytes. */
|
|
102
|
+
tell(): Promise<bigint>;
|
|
103
|
+
/**
|
|
104
|
+
* Releases the handle. Reads after `close()` fail. Calling it again does
|
|
105
|
+
* nothing.
|
|
106
|
+
*/
|
|
107
|
+
close(): Promise<void>;
|
|
108
|
+
/** Returns true after {@link BlobFile.close}. */
|
|
109
|
+
isClosed(): boolean;
|
|
91
110
|
}
|
|
111
|
+
/** Options for blob reads. */
|
|
112
|
+
export type BlobReadOptions = {
|
|
113
|
+
/**
|
|
114
|
+
* Cancels the read. The call rejects with `signal.reason`, and the native
|
|
115
|
+
* read stops, including in-flight requests to a remote table.
|
|
116
|
+
*/
|
|
117
|
+
signal?: AbortSignal;
|
|
118
|
+
};
|
|
119
|
+
/** @ignore */
|
|
120
|
+
export declare function runWithSignal<T>(signal: AbortSignal | undefined, run: (signal: AbortSignal | undefined) => Promise<T>): Promise<T>;
|
|
121
|
+
/** A half-open byte range `[start, end)` for {@link BlobFile.readRanges}. */
|
|
122
|
+
export type BlobRange = {
|
|
123
|
+
start: bigint;
|
|
124
|
+
end: bigint;
|
|
125
|
+
};
|
|
92
126
|
export declare function coerceBlobValue(value: unknown): BlobInput | null;
|
package/dist/blob.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.BlobFile = void 0;
|
|
6
6
|
exports.blob = blob;
|
|
7
7
|
exports.isBlobField = isBlobField;
|
|
8
|
+
exports.runWithSignal = runWithSignal;
|
|
8
9
|
exports.coerceBlobValue = coerceBlobValue;
|
|
9
10
|
const apache_arrow_1 = require("apache-arrow");
|
|
10
11
|
const native_1 = require("./native");
|
|
@@ -87,24 +88,77 @@ class BlobFile {
|
|
|
87
88
|
return this.inner.size();
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
|
-
* Reads from the cursor
|
|
91
|
+
* Reads from the cursor and advances the cursor.
|
|
91
92
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
93
|
+
* Reads to the end when `maxBytes` is omitted, or at most `maxBytes` bytes
|
|
94
|
+
* otherwise. Returns an empty buffer at the end of the blob.
|
|
95
|
+
* {@link BlobFile.readRange} does not move the cursor.
|
|
94
96
|
*/
|
|
95
|
-
read() {
|
|
96
|
-
return this.inner.read();
|
|
97
|
+
read(maxBytes, options) {
|
|
98
|
+
return runWithSignal(options?.signal, (signal) => this.inner.read(maxBytes, signal));
|
|
97
99
|
}
|
|
98
100
|
/**
|
|
99
101
|
* Reads the half-open byte range `[start, end)`.
|
|
100
102
|
*
|
|
101
103
|
* Fails when `end` is past the blob size. Does not move the cursor.
|
|
102
104
|
*/
|
|
103
|
-
readRange(start, end) {
|
|
104
|
-
return this.inner.readRange(start, end);
|
|
105
|
+
readRange(start, end, options) {
|
|
106
|
+
return runWithSignal(options?.signal, (signal) => this.inner.readRange(start, end, signal));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Reads several half-open byte ranges. Returns one buffer per range, in
|
|
110
|
+
* the order given.
|
|
111
|
+
*
|
|
112
|
+
* Fails when any `end` is past the blob size. Does not move the cursor.
|
|
113
|
+
*/
|
|
114
|
+
readRanges(ranges, options) {
|
|
115
|
+
return runWithSignal(options?.signal, (signal) => this.inner.readRanges(ranges, signal));
|
|
116
|
+
}
|
|
117
|
+
/** Moves the cursor to `position`, in bytes from the start of the blob. */
|
|
118
|
+
seek(position) {
|
|
119
|
+
return this.inner.seek(position);
|
|
120
|
+
}
|
|
121
|
+
/** Returns the cursor position in bytes. */
|
|
122
|
+
tell() {
|
|
123
|
+
return this.inner.tell();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Releases the handle. Reads after `close()` fail. Calling it again does
|
|
127
|
+
* nothing.
|
|
128
|
+
*/
|
|
129
|
+
close() {
|
|
130
|
+
return this.inner.close();
|
|
131
|
+
}
|
|
132
|
+
/** Returns true after {@link BlobFile.close}. */
|
|
133
|
+
isClosed() {
|
|
134
|
+
return this.inner.isClosed();
|
|
105
135
|
}
|
|
106
136
|
}
|
|
107
137
|
exports.BlobFile = BlobFile;
|
|
138
|
+
/** @ignore */
|
|
139
|
+
async function runWithSignal(signal, run) {
|
|
140
|
+
if (signal === undefined) {
|
|
141
|
+
return run(undefined);
|
|
142
|
+
}
|
|
143
|
+
signal.throwIfAborted();
|
|
144
|
+
// napi-rs replaces `onabort` on the signal it receives, so pass a private
|
|
145
|
+
// signal and forward the caller's abort to it.
|
|
146
|
+
const controller = new AbortController();
|
|
147
|
+
const onAbort = () => controller.abort();
|
|
148
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
149
|
+
try {
|
|
150
|
+
return await run(controller.signal);
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
if (signal.aborted) {
|
|
154
|
+
throw signal.reason;
|
|
155
|
+
}
|
|
156
|
+
throw err;
|
|
157
|
+
}
|
|
158
|
+
finally {
|
|
159
|
+
signal.removeEventListener("abort", onAbort);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
108
162
|
function coerceBlobValue(value) {
|
|
109
163
|
if (value == null) {
|
|
110
164
|
return null;
|
package/dist/connection.d.ts
CHANGED
|
@@ -501,6 +501,22 @@ export declare abstract class Connection {
|
|
|
501
501
|
* such job exists. Cancelling an already-terminal job is a no-op success.
|
|
502
502
|
*/
|
|
503
503
|
abstract cancelJob(jobId: string): Promise<boolean>;
|
|
504
|
+
/**
|
|
505
|
+
* Pause a server-side job by id.
|
|
506
|
+
*
|
|
507
|
+
* The job's workers drain and it stays parked until resumed. Resolves to
|
|
508
|
+
* "pausing", "already_paused", or "committing" -- a job finalizing its
|
|
509
|
+
* results cannot be parked; retry shortly.
|
|
510
|
+
*/
|
|
511
|
+
abstract pauseJob(jobId: string): Promise<string>;
|
|
512
|
+
/**
|
|
513
|
+
* Resume a paused server-side job by id.
|
|
514
|
+
*
|
|
515
|
+
* Its workers pick their work back up from checkpoints. Resolves to
|
|
516
|
+
* "resumed", "still_pausing" -- the pause's worker drain is not confirmed
|
|
517
|
+
* yet; retry shortly -- or "not_paused".
|
|
518
|
+
*/
|
|
519
|
+
abstract resumeJob(jobId: string): Promise<string>;
|
|
504
520
|
}
|
|
505
521
|
/** @hideconstructor */
|
|
506
522
|
export declare class LocalConnection extends Connection {
|
|
@@ -552,6 +568,8 @@ export declare class LocalConnection extends Connection {
|
|
|
552
568
|
openJob(jobId: string): Promise<Job>;
|
|
553
569
|
listJobs(): Promise<JobInfo[]>;
|
|
554
570
|
cancelJob(jobId: string): Promise<boolean>;
|
|
571
|
+
pauseJob(jobId: string): Promise<string>;
|
|
572
|
+
resumeJob(jobId: string): Promise<string>;
|
|
555
573
|
}
|
|
556
574
|
/**
|
|
557
575
|
* Takes storage options and makes all the keys snake case.
|
package/dist/connection.js
CHANGED
|
@@ -249,6 +249,12 @@ class LocalConnection extends Connection {
|
|
|
249
249
|
async cancelJob(jobId) {
|
|
250
250
|
return this.inner.cancelJob(jobId);
|
|
251
251
|
}
|
|
252
|
+
async pauseJob(jobId) {
|
|
253
|
+
return this.inner.pauseJob(jobId);
|
|
254
|
+
}
|
|
255
|
+
async resumeJob(jobId) {
|
|
256
|
+
return this.inner.resumeJob(jobId);
|
|
257
|
+
}
|
|
252
258
|
}
|
|
253
259
|
exports.LocalConnection = LocalConnection;
|
|
254
260
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { instrumentLanceDbMetrics } from "./otel";
|
|
|
10
10
|
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, RefreshColumnResult, FunctionErrors, FunctionErrorsOptions, FunctionErrorRecord, FunctionErrorFragment, RefreshMaterializedViewResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
11
11
|
export { makeArrowTable, makeJsonField, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
12
12
|
export { blob, isBlobField, BlobFile } from "./blob";
|
|
13
|
-
export type { BlobOptions } from "./blob";
|
|
13
|
+
export type { BlobOptions, BlobRange, BlobReadOptions } from "./blob";
|
|
14
14
|
export { Connection, CreateTableOptions, TableNamesOptions, ListTablesOptions, OpenTableOptions, ListNamespacesOptions, CreateNamespaceOptions, DropNamespaceOptions, ListNamespacesResponse, ListTablesResponse, CreateNamespaceResponse, DropNamespaceResponse, DescribeNamespaceResponse, RenameTableOptions, } from "./connection";
|
|
15
15
|
export { JobFailureInfo, JobInfo, Session } from "./native.js";
|
|
16
16
|
export { Job, JobEventsOptions } from "./job";
|
|
@@ -4,9 +4,10 @@ import { Table } from "./table";
|
|
|
4
4
|
export declare const DEFINITION_META_KEY = "mv.definition";
|
|
5
5
|
/**
|
|
6
6
|
* The newest stored layout this version reads: `{"format": N, "query": "<SQL>"}`,
|
|
7
|
-
* format 2 being a query with `GROUP BY
|
|
7
|
+
* format 2 being a query with `GROUP BY`, format 3 native pairs and format 4
|
|
8
|
+
* native dedup results.
|
|
8
9
|
*/
|
|
9
|
-
export declare const DEFINITION_FORMAT =
|
|
10
|
+
export declare const DEFINITION_FORMAT = 4;
|
|
10
11
|
/**
|
|
11
12
|
* The query that defines a materialized view, as stored:
|
|
12
13
|
* `SELECT columns FROM [ns.]table [, function(args) AS alias | , UNNEST(column) AS alias]
|
|
@@ -11,9 +11,10 @@ exports.definitionFromJson = definitionFromJson;
|
|
|
11
11
|
exports.DEFINITION_META_KEY = "mv.definition";
|
|
12
12
|
/**
|
|
13
13
|
* The newest stored layout this version reads: `{"format": N, "query": "<SQL>"}`,
|
|
14
|
-
* format 2 being a query with `GROUP BY
|
|
14
|
+
* format 2 being a query with `GROUP BY`, format 3 native pairs and format 4
|
|
15
|
+
* native dedup results.
|
|
15
16
|
*/
|
|
16
|
-
exports.DEFINITION_FORMAT =
|
|
17
|
+
exports.DEFINITION_FORMAT = 4;
|
|
17
18
|
/**
|
|
18
19
|
* @internal Reject a numeric option N-API would otherwise silently coerce:
|
|
19
20
|
* `Infinity` reaches Rust as 0, `1.5` as 1.
|
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 {
|
|
@@ -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 */
|
|
@@ -368,7 +383,7 @@ export declare class Table {
|
|
|
368
383
|
close(): void
|
|
369
384
|
/** Return Schema as empty Arrow IPC file. */
|
|
370
385
|
schema(): Promise<Buffer>
|
|
371
|
-
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void): Promise<AddResult>
|
|
386
|
+
add(buf: Buffer, mode: string, progressCallback?: (progress: WriteProgressInfo) => void, allowExternalBlobOutsideBases?: boolean): Promise<AddResult>
|
|
372
387
|
countRows(filter?: string | undefined | null): Promise<number>
|
|
373
388
|
delete(predicate: string): Promise<DeleteResult>
|
|
374
389
|
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,8 +402,8 @@ export declare class Table {
|
|
|
387
402
|
takeOffsets(offsets: Array<number>): TakeQuery
|
|
388
403
|
takeRowIds(rowIds: Array<bigint>): TakeQuery
|
|
389
404
|
blobColumns(): Promise<Array<string>>
|
|
390
|
-
fetchBlobs(column: string, rowIds: Array<bigint
|
|
391
|
-
fetchBlobFiles(column: string, rowIds: Array<bigint
|
|
405
|
+
fetchBlobs(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<Buffer | undefined | null>>
|
|
406
|
+
fetchBlobFiles(column: string, rowIds: Array<bigint>, signal?: AbortSignal | undefined | null): Promise<Array<BlobFile | undefined | null>>
|
|
392
407
|
vectorSearch(vector: Float32Array): VectorQuery
|
|
393
408
|
addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
394
409
|
addComputedColumns(columns: Array<AddColumnsSql>): Promise<AddColumnsResult>
|
|
@@ -507,6 +522,11 @@ export interface AlterColumnsResult {
|
|
|
507
522
|
version: number
|
|
508
523
|
}
|
|
509
524
|
|
|
525
|
+
export interface BlobRange {
|
|
526
|
+
start: bigint
|
|
527
|
+
end: bigint
|
|
528
|
+
}
|
|
529
|
+
|
|
510
530
|
/**
|
|
511
531
|
* Live state of one bucket. A table is N buckets on one node; flattening to a
|
|
512
532
|
* single number hides the one hot bucket that is usually why someone opened
|
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.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.40.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.40.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.40.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.40.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.40.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.40.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.40.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.40.0-beta.12 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/sanitize.js
CHANGED
|
@@ -286,8 +286,12 @@ function sanitizeTypeById(typeLike, typeId, context) {
|
|
|
286
286
|
return sanitizeFloat(typeLike);
|
|
287
287
|
case arrow_1.Type.Binary:
|
|
288
288
|
return new arrow_1.Binary();
|
|
289
|
+
case arrow_1.Type.LargeBinary:
|
|
290
|
+
return new arrow_1.LargeBinary();
|
|
289
291
|
case arrow_1.Type.Utf8:
|
|
290
292
|
return new arrow_1.Utf8();
|
|
293
|
+
case arrow_1.Type.LargeUtf8:
|
|
294
|
+
return new arrow_1.LargeUtf8();
|
|
291
295
|
case arrow_1.Type.Bool:
|
|
292
296
|
return new arrow_1.Bool();
|
|
293
297
|
case arrow_1.Type.Decimal:
|
package/dist/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Table as ArrowTable, Data, DataType, Field, IntoVector, MultiVector, Schema } from "./arrow";
|
|
2
|
-
import { BlobFile } from "./blob";
|
|
2
|
+
import { BlobFile, BlobReadOptions } from "./blob";
|
|
3
3
|
import { IndexOptions } from "./indices";
|
|
4
4
|
import { Job } from "./job";
|
|
5
5
|
import { MergeInsertBuilder } from "./merge";
|
|
@@ -65,6 +65,16 @@ export interface AddDataOptions {
|
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
67
|
progress: (progress: WriteProgress) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Whether blob URIs outside registered external bases may be written.
|
|
70
|
+
*
|
|
71
|
+
* Defaults to `false`. This option is supported only for local/native
|
|
72
|
+
* tables; remote tables return an error when it is enabled. An enabled write
|
|
73
|
+
* stores the absolute URI reference without registering a base or copying
|
|
74
|
+
* the external object into the database. The object must remain accessible
|
|
75
|
+
* when the blob is read later.
|
|
76
|
+
*/
|
|
77
|
+
allowExternalBlobOutsideBases?: boolean;
|
|
68
78
|
}
|
|
69
79
|
export interface UpdateOptions {
|
|
70
80
|
/**
|
|
@@ -424,8 +434,12 @@ export declare abstract class Table {
|
|
|
424
434
|
* Reads the table's current checkout. IDs from another version can fail after
|
|
425
435
|
* compaction unless stable row ids are enabled. Results keep input order and
|
|
426
436
|
* duplicates. Null blobs are `null`. Empty blobs are empty buffers.
|
|
437
|
+
* Remote servers limit each request to 1024 row IDs and 64 MiB of blob bytes.
|
|
438
|
+
* The client splits requests automatically and reads an individual larger
|
|
439
|
+
* blob through the Range route. This method still materializes all bytes in
|
|
440
|
+
* memory; use {@link Table.fetchBlobFiles} for large values.
|
|
427
441
|
*/
|
|
428
|
-
abstract fetchBlobs(column: string, rowIds: readonly (bigint | number)[]): Promise<(Buffer | null)[]>;
|
|
442
|
+
abstract fetchBlobs(column: string, rowIds: readonly (bigint | number)[], options?: BlobReadOptions): Promise<(Buffer | null)[]>;
|
|
429
443
|
/**
|
|
430
444
|
* Opens lazy blob handles for `column` at the given row IDs using the
|
|
431
445
|
* table's current checkout.
|
|
@@ -433,7 +447,7 @@ export declare abstract class Table {
|
|
|
433
447
|
* Preserves input order, duplicates, and nulls. Use this for large payloads.
|
|
434
448
|
* See {@link Table.fetchBlobs} for row-ID validity across versions.
|
|
435
449
|
*/
|
|
436
|
-
abstract fetchBlobFiles(column: string, rowIds: readonly (bigint | number)[]): Promise<(BlobFile | null)[]>;
|
|
450
|
+
abstract fetchBlobFiles(column: string, rowIds: readonly (bigint | number)[], options?: BlobReadOptions): Promise<(BlobFile | null)[]>;
|
|
437
451
|
/**
|
|
438
452
|
* Create a search query to find the nearest neighbors
|
|
439
453
|
* of the given query
|
|
@@ -904,8 +918,8 @@ export declare class LocalTable extends Table {
|
|
|
904
918
|
takeOffsets(offsets: number[]): TakeQuery;
|
|
905
919
|
takeRowIds(rowIds: readonly (bigint | number)[]): TakeQuery;
|
|
906
920
|
blobColumns(): Promise<string[]>;
|
|
907
|
-
fetchBlobs(column: string, rowIds: readonly (bigint | number)[]): Promise<(Buffer | null)[]>;
|
|
908
|
-
fetchBlobFiles(column: string, rowIds: readonly (bigint | number)[]): Promise<(BlobFile | null)[]>;
|
|
921
|
+
fetchBlobs(column: string, rowIds: readonly (bigint | number)[], options?: BlobReadOptions): Promise<(Buffer | null)[]>;
|
|
922
|
+
fetchBlobFiles(column: string, rowIds: readonly (bigint | number)[], options?: BlobReadOptions): Promise<(BlobFile | null)[]>;
|
|
909
923
|
query(): Query;
|
|
910
924
|
search(query: string | IntoVector | MultiVector | FullTextQuery, queryType?: string, ftsColumns?: string | string[]): VectorQuery | Query | AutoQuery;
|
|
911
925
|
vectorSearch(vector: IntoVector | MultiVector): VectorQuery;
|
package/dist/table.js
CHANGED
|
@@ -84,7 +84,7 @@ class LocalTable extends Table {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
: undefined;
|
|
87
|
-
return await this.inner.add(buffer, mode, progress);
|
|
87
|
+
return await this.inner.add(buffer, mode, progress, options?.allowExternalBlobOutsideBases);
|
|
88
88
|
}
|
|
89
89
|
async update(optsOrUpdates, options) {
|
|
90
90
|
const isValues = "values" in optsOrUpdates && typeof optsOrUpdates.values !== "string";
|
|
@@ -169,13 +169,13 @@ class LocalTable extends Table {
|
|
|
169
169
|
blobColumns() {
|
|
170
170
|
return this.inner.blobColumns();
|
|
171
171
|
}
|
|
172
|
-
async fetchBlobs(column, rowIds) {
|
|
173
|
-
const values = await this.inner.fetchBlobs(column, rowIdsToBigInts(rowIds));
|
|
172
|
+
async fetchBlobs(column, rowIds, options) {
|
|
173
|
+
const values = await (0, blob_1.runWithSignal)(options?.signal, (signal) => this.inner.fetchBlobs(column, rowIdsToBigInts(rowIds), signal));
|
|
174
174
|
// N-API Option maps missing values to undefined. Collapse those to null.
|
|
175
175
|
return values.map((value) => value ?? null);
|
|
176
176
|
}
|
|
177
|
-
async fetchBlobFiles(column, rowIds) {
|
|
178
|
-
const files = await this.inner.fetchBlobFiles(column, rowIdsToBigInts(rowIds));
|
|
177
|
+
async fetchBlobFiles(column, rowIds, options) {
|
|
178
|
+
const files = await (0, blob_1.runWithSignal)(options?.signal, (signal) => this.inner.fetchBlobFiles(column, rowIdsToBigInts(rowIds), signal));
|
|
179
179
|
// N-API Option maps missing values to undefined. Collapse those to null.
|
|
180
180
|
return files.map((file) => file == null ? null : blob_1.BlobFile.fromNative(file));
|
|
181
181
|
}
|
package/dist/util.js
CHANGED
|
@@ -10,6 +10,15 @@ function toSQL(value) {
|
|
|
10
10
|
return `'${value.replace(/'/g, "''")}'`;
|
|
11
11
|
}
|
|
12
12
|
else if (typeof value === "number") {
|
|
13
|
+
// toString() gives "NaN" / "Infinity", which SQL reads as column names.
|
|
14
|
+
if (Number.isNaN(value)) {
|
|
15
|
+
return "CAST('NaN' AS DOUBLE)";
|
|
16
|
+
}
|
|
17
|
+
else if (!Number.isFinite(value)) {
|
|
18
|
+
return value > 0
|
|
19
|
+
? "CAST('Infinity' AS DOUBLE)"
|
|
20
|
+
: "CAST('-Infinity' AS DOUBLE)";
|
|
21
|
+
}
|
|
13
22
|
return value.toString();
|
|
14
23
|
}
|
|
15
24
|
else if (typeof value === "boolean") {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.40.0-beta.
|
|
14
|
+
"version": "0.40.0-beta.12",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"optionalDependencies": {
|
|
107
107
|
"@huggingface/transformers": "3.0.2",
|
|
108
108
|
"openai": "4.29.2",
|
|
109
|
-
"@lancedb/lancedb-darwin-arm64": "0.40.0-beta.
|
|
110
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.40.0-beta.
|
|
111
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.40.0-beta.
|
|
112
|
-
"@lancedb/lancedb-linux-x64-musl": "0.40.0-beta.
|
|
113
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.40.0-beta.
|
|
114
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.40.0-beta.
|
|
115
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.40.0-beta.
|
|
109
|
+
"@lancedb/lancedb-darwin-arm64": "0.40.0-beta.12",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.40.0-beta.12",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.40.0-beta.12",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.40.0-beta.12",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.40.0-beta.12",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.40.0-beta.12",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.40.0-beta.12"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@types/node": ">=22",
|