@lancedb/lancedb 0.27.2-beta.1 → 0.28.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/dist/arrow.d.ts CHANGED
@@ -35,10 +35,18 @@ export type TableLike = ArrowTable | {
35
35
  schema: SchemaLike;
36
36
  batches: RecordBatchLike[];
37
37
  };
38
- export type IntoVector = Float32Array | Float64Array | number[] | Promise<Float32Array | Float64Array | number[]>;
38
+ export type IntoVector = Float32Array | Float64Array | Uint8Array | number[] | Promise<Float32Array | Float64Array | Uint8Array | number[]>;
39
39
  export type MultiVector = IntoVector[];
40
40
  export declare function isMultiVector(value: unknown): value is MultiVector;
41
41
  export declare function isIntoVector(value: unknown): value is IntoVector;
42
+ /**
43
+ * Extract the underlying byte buffer and data type from a typed array
44
+ * for passing to the Rust NAPI layer without precision loss.
45
+ */
46
+ export declare function extractVectorBuffer(vector: Float32Array | Float64Array | Uint8Array): {
47
+ data: Uint8Array;
48
+ dtype: string;
49
+ } | null;
42
50
  export declare function isArrowTable(value: object): value is TableLike;
43
51
  export declare function isNull(value: unknown): value is Null;
44
52
  export declare function isInt(value: unknown): value is Int;
package/dist/arrow.js CHANGED
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.MakeArrowTableOptions = exports.VectorColumnOptions = void 0;
20
20
  exports.isMultiVector = isMultiVector;
21
21
  exports.isIntoVector = isIntoVector;
22
+ exports.extractVectorBuffer = extractVectorBuffer;
22
23
  exports.isArrowTable = isArrowTable;
23
24
  exports.isNull = isNull;
24
25
  exports.isInt = isInt;
@@ -67,11 +68,37 @@ __exportStar(require("apache-arrow"), exports);
67
68
  function isMultiVector(value) {
68
69
  return Array.isArray(value) && isIntoVector(value[0]);
69
70
  }
71
+ const float16ArrayCtor = globalThis
72
+ .Float16Array;
70
73
  function isIntoVector(value) {
71
74
  return (value instanceof Float32Array ||
72
75
  value instanceof Float64Array ||
76
+ value instanceof Uint8Array ||
77
+ (float16ArrayCtor !== undefined && value instanceof float16ArrayCtor) ||
73
78
  (Array.isArray(value) && !Array.isArray(value[0])));
74
79
  }
80
+ /**
81
+ * Extract the underlying byte buffer and data type from a typed array
82
+ * for passing to the Rust NAPI layer without precision loss.
83
+ */
84
+ function extractVectorBuffer(vector) {
85
+ if (float16ArrayCtor !== undefined && vector instanceof float16ArrayCtor) {
86
+ return {
87
+ data: new Uint8Array(vector.buffer, vector.byteOffset, vector.byteLength),
88
+ dtype: "float16",
89
+ };
90
+ }
91
+ if (vector instanceof Float64Array) {
92
+ return {
93
+ data: new Uint8Array(vector.buffer, vector.byteOffset, vector.byteLength),
94
+ dtype: "float64",
95
+ };
96
+ }
97
+ if (vector instanceof Uint8Array && !(vector instanceof Float32Array)) {
98
+ return { data: vector, dtype: "uint8" };
99
+ }
100
+ return null;
101
+ }
75
102
  function isArrowTable(value) {
76
103
  if (value instanceof apache_arrow_1.Table)
77
104
  return true;
@@ -136,31 +136,31 @@ export declare abstract class Connection {
136
136
  * List all the table names in this database.
137
137
  *
138
138
  * Tables will be returned in lexicographical order.
139
- * @param {string[]} namespace - The namespace to list tables from (defaults to root namespace)
139
+ * @param {string[]} namespacePath - The namespace path to list tables from (defaults to root namespace)
140
140
  * @param {Partial<TableNamesOptions>} options - options to control the
141
141
  * paging / start point
142
142
  *
143
143
  */
144
- abstract tableNames(namespace?: string[], options?: Partial<TableNamesOptions>): Promise<string[]>;
144
+ abstract tableNames(namespacePath?: string[], options?: Partial<TableNamesOptions>): Promise<string[]>;
145
145
  /**
146
146
  * Open a table in the database.
147
147
  * @param {string} name - The name of the table
148
- * @param {string[]} namespace - The namespace of the table (defaults to root namespace)
148
+ * @param {string[]} namespacePath - The namespace path of the table (defaults to root namespace)
149
149
  * @param {Partial<OpenTableOptions>} options - Additional options
150
150
  */
151
- abstract openTable(name: string, namespace?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
151
+ abstract openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
152
152
  /**
153
153
  * Creates a new Table and initialize it with new data.
154
154
  * @param {object} options - The options object.
155
155
  * @param {string} options.name - The name of the table.
156
156
  * @param {Data} options.data - Non-empty Array of Records to be inserted into the table
157
- * @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
157
+ * @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
158
158
  *
159
159
  */
160
160
  abstract createTable(options: {
161
161
  name: string;
162
162
  data: Data;
163
- } & Partial<CreateTableOptions>, namespace?: string[]): Promise<Table>;
163
+ } & Partial<CreateTableOptions>, namespacePath?: string[]): Promise<Table>;
164
164
  /**
165
165
  * Creates a new Table and initialize it with new data.
166
166
  * @param {string} name - The name of the table.
@@ -174,10 +174,10 @@ export declare abstract class Connection {
174
174
  * @param {string} name - The name of the table.
175
175
  * @param {Record<string, unknown>[] | TableLike} data - Non-empty Array of Records
176
176
  * to be inserted into the table
177
- * @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
177
+ * @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
178
178
  * @param {Partial<CreateTableOptions>} options - Additional options
179
179
  */
180
- abstract createTable(name: string, data: Record<string, unknown>[] | TableLike, namespace?: string[], options?: Partial<CreateTableOptions>): Promise<Table>;
180
+ abstract createTable(name: string, data: Record<string, unknown>[] | TableLike, namespacePath?: string[], options?: Partial<CreateTableOptions>): Promise<Table>;
181
181
  /**
182
182
  * Creates a new empty Table
183
183
  * @param {string} name - The name of the table.
@@ -189,21 +189,21 @@ export declare abstract class Connection {
189
189
  * Creates a new empty Table
190
190
  * @param {string} name - The name of the table.
191
191
  * @param {Schema} schema - The schema of the table
192
- * @param {string[]} namespace - The namespace to create the table in (defaults to root namespace)
192
+ * @param {string[]} namespacePath - The namespace path to create the table in (defaults to root namespace)
193
193
  * @param {Partial<CreateTableOptions>} options - Additional options
194
194
  */
195
- abstract createEmptyTable(name: string, schema: import("./arrow").SchemaLike, namespace?: string[], options?: Partial<CreateTableOptions>): Promise<Table>;
195
+ abstract createEmptyTable(name: string, schema: import("./arrow").SchemaLike, namespacePath?: string[], options?: Partial<CreateTableOptions>): Promise<Table>;
196
196
  /**
197
197
  * Drop an existing table.
198
198
  * @param {string} name The name of the table to drop.
199
- * @param {string[]} namespace The namespace of the table (defaults to root namespace).
199
+ * @param {string[]} namespacePath The namespace path of the table (defaults to root namespace).
200
200
  */
201
- abstract dropTable(name: string, namespace?: string[]): Promise<void>;
201
+ abstract dropTable(name: string, namespacePath?: string[]): Promise<void>;
202
202
  /**
203
203
  * Drop all tables in the database.
204
- * @param {string[]} namespace The namespace to drop tables from (defaults to root namespace).
204
+ * @param {string[]} namespacePath The namespace path to drop tables from (defaults to root namespace).
205
205
  */
206
- abstract dropAllTables(namespace?: string[]): Promise<void>;
206
+ abstract dropAllTables(namespacePath?: string[]): Promise<void>;
207
207
  /**
208
208
  * Clone a table from a source table.
209
209
  *
@@ -215,13 +215,13 @@ export declare abstract class Connection {
215
215
  * @param {string} targetTableName - The name of the target table to create.
216
216
  * @param {string} sourceUri - The URI of the source table to clone from.
217
217
  * @param {object} options - Clone options.
218
- * @param {string[]} options.targetNamespace - The namespace for the target table (defaults to root namespace).
218
+ * @param {string[]} options.targetNamespacePath - The namespace path for the target table (defaults to root namespace).
219
219
  * @param {number} options.sourceVersion - The version of the source table to clone.
220
220
  * @param {string} options.sourceTag - The tag of the source table to clone.
221
221
  * @param {boolean} options.isShallow - Whether to perform a shallow clone (defaults to true).
222
222
  */
223
223
  abstract cloneTable(targetTableName: string, sourceUri: string, options?: {
224
- targetNamespace?: string[];
224
+ targetNamespacePath?: string[];
225
225
  sourceVersion?: number;
226
226
  sourceTag?: string;
227
227
  isShallow?: boolean;
@@ -235,10 +235,10 @@ export declare class LocalConnection extends Connection {
235
235
  isOpen(): boolean;
236
236
  close(): void;
237
237
  display(): string;
238
- tableNames(namespaceOrOptions?: string[] | Partial<TableNamesOptions>, options?: Partial<TableNamesOptions>): Promise<string[]>;
239
- openTable(name: string, namespace?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
238
+ tableNames(namespacePathOrOptions?: string[] | Partial<TableNamesOptions>, options?: Partial<TableNamesOptions>): Promise<string[]>;
239
+ openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
240
240
  cloneTable(targetTableName: string, sourceUri: string, options?: {
241
- targetNamespace?: string[];
241
+ targetNamespacePath?: string[];
242
242
  sourceVersion?: number;
243
243
  sourceTag?: string;
244
244
  isShallow?: boolean;
@@ -247,11 +247,11 @@ export declare class LocalConnection extends Connection {
247
247
  createTable(nameOrOptions: string | ({
248
248
  name: string;
249
249
  data: Data;
250
- } & Partial<CreateTableOptions>), dataOrNamespace?: Record<string, unknown>[] | TableLike | string[], namespaceOrOptions?: string[] | Partial<CreateTableOptions>, options?: Partial<CreateTableOptions>): Promise<Table>;
250
+ } & Partial<CreateTableOptions>), dataOrNamespacePath?: Record<string, unknown>[] | TableLike | string[], namespacePathOrOptions?: string[] | Partial<CreateTableOptions>, options?: Partial<CreateTableOptions>): Promise<Table>;
251
251
  private _createTableImpl;
252
- createEmptyTable(name: string, schema: import("./arrow").SchemaLike, namespaceOrOptions?: string[] | Partial<CreateTableOptions>, options?: Partial<CreateTableOptions>): Promise<Table>;
253
- dropTable(name: string, namespace?: string[]): Promise<void>;
254
- dropAllTables(namespace?: string[]): Promise<void>;
252
+ createEmptyTable(name: string, schema: import("./arrow").SchemaLike, namespacePathOrOptions?: string[] | Partial<CreateTableOptions>, options?: Partial<CreateTableOptions>): Promise<Table>;
253
+ dropTable(name: string, namespacePath?: string[]): Promise<void>;
254
+ dropAllTables(namespacePath?: string[]): Promise<void>;
255
255
  }
256
256
  /**
257
257
  * Takes storage options and makes all the keys snake case.
@@ -51,28 +51,28 @@ class LocalConnection extends Connection {
51
51
  display() {
52
52
  return this.inner.display();
53
53
  }
54
- async tableNames(namespaceOrOptions, options) {
55
- // Detect if first argument is namespace array or options object
56
- let namespace;
54
+ async tableNames(namespacePathOrOptions, options) {
55
+ // Detect if first argument is namespacePath array or options object
56
+ let namespacePath;
57
57
  let tableNamesOptions;
58
- if (Array.isArray(namespaceOrOptions)) {
59
- // First argument is namespace array
60
- namespace = namespaceOrOptions;
58
+ if (Array.isArray(namespacePathOrOptions)) {
59
+ // First argument is namespacePath array
60
+ namespacePath = namespacePathOrOptions;
61
61
  tableNamesOptions = options;
62
62
  }
63
63
  else {
64
64
  // First argument is options object (backwards compatibility)
65
- namespace = undefined;
66
- tableNamesOptions = namespaceOrOptions;
65
+ namespacePath = undefined;
66
+ tableNamesOptions = namespacePathOrOptions;
67
67
  }
68
- return this.inner.tableNames(namespace ?? [], tableNamesOptions?.startAfter, tableNamesOptions?.limit);
68
+ return this.inner.tableNames(namespacePath ?? [], tableNamesOptions?.startAfter, tableNamesOptions?.limit);
69
69
  }
70
- async openTable(name, namespace, options) {
71
- const innerTable = await this.inner.openTable(name, namespace ?? [], cleanseStorageOptions(options?.storageOptions), options?.indexCacheSize);
70
+ async openTable(name, namespacePath, options) {
71
+ const innerTable = await this.inner.openTable(name, namespacePath ?? [], cleanseStorageOptions(options?.storageOptions), options?.indexCacheSize);
72
72
  return new table_1.LocalTable(innerTable);
73
73
  }
74
74
  async cloneTable(targetTableName, sourceUri, options) {
75
- const innerTable = await this.inner.cloneTable(targetTableName, sourceUri, options?.targetNamespace ?? [], options?.sourceVersion ?? null, options?.sourceTag ?? null, options?.isShallow ?? true);
75
+ const innerTable = await this.inner.cloneTable(targetTableName, sourceUri, options?.targetNamespacePath ?? [], options?.sourceVersion ?? null, options?.sourceTag ?? null, options?.isShallow ?? true);
76
76
  return new table_1.LocalTable(innerTable);
77
77
  }
78
78
  getStorageOptions(options) {
@@ -92,53 +92,53 @@ class LocalConnection extends Connection {
92
92
  }
93
93
  return cleanseStorageOptions(options?.storageOptions);
94
94
  }
95
- async createTable(nameOrOptions, dataOrNamespace, namespaceOrOptions, options) {
95
+ async createTable(nameOrOptions, dataOrNamespacePath, namespacePathOrOptions, options) {
96
96
  if (typeof nameOrOptions !== "string" && "name" in nameOrOptions) {
97
- // First overload: createTable(options, namespace?)
97
+ // First overload: createTable(options, namespacePath?)
98
98
  const { name, data, ...createOptions } = nameOrOptions;
99
- const namespace = dataOrNamespace;
100
- return this._createTableImpl(name, data, namespace, createOptions);
99
+ const namespacePath = dataOrNamespacePath;
100
+ return this._createTableImpl(name, data, namespacePath, createOptions);
101
101
  }
102
- // Second overload: createTable(name, data, namespace?, options?)
102
+ // Second overload: createTable(name, data, namespacePath?, options?)
103
103
  const name = nameOrOptions;
104
- const data = dataOrNamespace;
105
- // Detect if third argument is namespace array or options object
106
- let namespace;
104
+ const data = dataOrNamespacePath;
105
+ // Detect if third argument is namespacePath array or options object
106
+ let namespacePath;
107
107
  let createOptions;
108
- if (Array.isArray(namespaceOrOptions)) {
109
- // Third argument is namespace array
110
- namespace = namespaceOrOptions;
108
+ if (Array.isArray(namespacePathOrOptions)) {
109
+ // Third argument is namespacePath array
110
+ namespacePath = namespacePathOrOptions;
111
111
  createOptions = options;
112
112
  }
113
113
  else {
114
114
  // Third argument is options object (backwards compatibility)
115
- namespace = undefined;
116
- createOptions = namespaceOrOptions;
115
+ namespacePath = undefined;
116
+ createOptions = namespacePathOrOptions;
117
117
  }
118
- return this._createTableImpl(name, data, namespace, createOptions);
118
+ return this._createTableImpl(name, data, namespacePath, createOptions);
119
119
  }
120
- async _createTableImpl(name, data, namespace, options) {
120
+ async _createTableImpl(name, data, namespacePath, options) {
121
121
  if (data === undefined) {
122
122
  throw new Error("data is required");
123
123
  }
124
124
  const { buf, mode } = await parseTableData(data, options);
125
125
  const storageOptions = this.getStorageOptions(options);
126
- const innerTable = await this.inner.createTable(name, buf, mode, namespace ?? [], storageOptions);
126
+ const innerTable = await this.inner.createTable(name, buf, mode, namespacePath ?? [], storageOptions);
127
127
  return new table_1.LocalTable(innerTable);
128
128
  }
129
- async createEmptyTable(name, schema, namespaceOrOptions, options) {
130
- // Detect if third argument is namespace array or options object
131
- let namespace;
129
+ async createEmptyTable(name, schema, namespacePathOrOptions, options) {
130
+ // Detect if third argument is namespacePath array or options object
131
+ let namespacePath;
132
132
  let createOptions;
133
- if (Array.isArray(namespaceOrOptions)) {
134
- // Third argument is namespace array
135
- namespace = namespaceOrOptions;
133
+ if (Array.isArray(namespacePathOrOptions)) {
134
+ // Third argument is namespacePath array
135
+ namespacePath = namespacePathOrOptions;
136
136
  createOptions = options;
137
137
  }
138
138
  else {
139
139
  // Third argument is options object (backwards compatibility)
140
- namespace = undefined;
141
- createOptions = namespaceOrOptions;
140
+ namespacePath = undefined;
141
+ createOptions = namespacePathOrOptions;
142
142
  }
143
143
  let mode = createOptions?.mode ?? "create";
144
144
  const existOk = createOptions?.existOk ?? false;
@@ -154,14 +154,14 @@ class LocalConnection extends Connection {
154
154
  const storageOptions = this.getStorageOptions(createOptions);
155
155
  const table = (0, arrow_2.makeEmptyTable)(schema, metadata);
156
156
  const buf = await (0, arrow_2.fromTableToBuffer)(table);
157
- const innerTable = await this.inner.createEmptyTable(name, buf, mode, namespace ?? [], storageOptions);
157
+ const innerTable = await this.inner.createEmptyTable(name, buf, mode, namespacePath ?? [], storageOptions);
158
158
  return new table_1.LocalTable(innerTable);
159
159
  }
160
- async dropTable(name, namespace) {
161
- return this.inner.dropTable(name, namespace ?? []);
160
+ async dropTable(name, namespacePath) {
161
+ return this.inner.dropTable(name, namespacePath ?? []);
162
162
  }
163
- async dropAllTables(namespace) {
164
- return this.inner.dropAllTables(namespace ?? []);
163
+ async dropAllTables(namespacePath) {
164
+ return this.inner.dropAllTables(namespacePath ?? []);
165
165
  }
166
166
  }
167
167
  exports.LocalConnection = LocalConnection;
package/dist/native.d.ts CHANGED
@@ -7,7 +7,7 @@ export declare class Connection {
7
7
  isOpen(): boolean
8
8
  close(): void
9
9
  /** List all tables in the dataset. */
10
- tableNames(namespace: Array<string>, startAfter?: string | undefined | null, limit?: number | undefined | null): Promise<Array<string>>
10
+ tableNames(namespacePath?: Array<string> | undefined | null, startAfter?: string | undefined | null, limit?: number | undefined | null): Promise<Array<string>>
11
11
  /**
12
12
  * Create table from a Apache Arrow IPC (file) buffer.
13
13
  *
@@ -15,13 +15,13 @@ export declare class Connection {
15
15
  * - name: The name of the table.
16
16
  * - buf: The buffer containing the IPC file.
17
17
  */
18
- createTable(name: string, buf: Buffer, mode: string, namespace: Array<string>, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
19
- createEmptyTable(name: string, schemaBuf: Buffer, mode: string, namespace: Array<string>, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
20
- openTable(name: string, namespace: Array<string>, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
21
- cloneTable(targetTableName: string, sourceUri: string, targetNamespace: Array<string>, sourceVersion: number | undefined | null, sourceTag: string | undefined | null, isShallow: boolean): Promise<Table>
18
+ createTable(name: string, buf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
19
+ createEmptyTable(name: string, schemaBuf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
20
+ openTable(name: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
21
+ cloneTable(targetTableName: string, sourceUri: string, targetNamespacePath: Array<string> | undefined | null, sourceVersion: number | undefined | null, sourceTag: string | undefined | null, isShallow: boolean): Promise<Table>
22
22
  /** Drop table with the name. Or raise an error if the table does not exist. */
23
- dropTable(name: string, namespace: Array<string>): Promise<void>
24
- dropAllTables(namespace: Array<string>): Promise<void>
23
+ dropTable(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
24
+ dropAllTables(namespacePath?: Array<string> | undefined | null): Promise<void>
25
25
  }
26
26
 
27
27
  export declare class Index {
@@ -91,6 +91,7 @@ export declare class Query {
91
91
  limit(limit: number): void
92
92
  offset(offset: number): void
93
93
  nearestTo(vector: Float32Array): VectorQuery
94
+ nearestToRaw(data: Uint8Array, dtype: string): VectorQuery
94
95
  fastSearch(): void
95
96
  withRowId(): void
96
97
  outputSchema(): Promise<Buffer>
@@ -213,6 +214,7 @@ export declare class TakeQuery {
213
214
  export declare class VectorQuery {
214
215
  column(column: string): void
215
216
  addQueryVector(vector: Float32Array): void
217
+ addQueryVectorRaw(data: Uint8Array, dtype: string): void
216
218
  distanceType(distanceType: string): void
217
219
  postfilter(): void
218
220
  refineFactor(refineFactor: number): void
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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
80
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
79
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
99
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
98
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
124
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
123
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
143
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
142
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
181
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
204
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
223
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
222
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
241
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
265
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
285
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
284
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
310
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
309
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
328
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
350
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
349
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
369
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
368
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
390
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
389
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
409
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
408
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
429
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
449
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
448
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
470
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
469
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
489
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
488
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
509
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
508
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
528
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
527
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
552
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
551
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
571
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
570
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 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.27.2-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
590
- throw new Error(`Native binding package version mismatch, expected 0.27.2-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
589
+ if (bindingPackageVersion !== '0.28.0-beta.0' && 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.28.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
591
591
  }
592
592
  return binding;
593
593
  }
package/dist/query.js CHANGED
@@ -556,10 +556,8 @@ class VectorQuery extends StandardQueryBase {
556
556
  const res = (async () => {
557
557
  try {
558
558
  const v = await vector;
559
- const arr = Float32Array.from(v);
560
- //
561
559
  // biome-ignore lint/suspicious/noExplicitAny: we need to get the `inner`, but js has no package scoping
562
- const value = this.addQueryVector(arr);
560
+ const value = this.addQueryVector(v);
563
561
  const inner = value.inner;
564
562
  return inner;
565
563
  }
@@ -571,7 +569,13 @@ class VectorQuery extends StandardQueryBase {
571
569
  }
572
570
  else {
573
571
  super.doCall((inner) => {
574
- inner.addQueryVector(Float32Array.from(vector));
572
+ const raw = Array.isArray(vector) ? null : (0, arrow_1.extractVectorBuffer)(vector);
573
+ if (raw) {
574
+ inner.addQueryVectorRaw(raw.data, raw.dtype);
575
+ }
576
+ else {
577
+ inner.addQueryVector(Float32Array.from(vector));
578
+ }
575
579
  });
576
580
  return this;
577
581
  }
@@ -650,15 +654,19 @@ class Query extends StandardQueryBase {
650
654
  * a default `limit` of 10 will be used. @see {@link Query#limit}
651
655
  */
652
656
  nearestTo(vector) {
657
+ const callNearestTo = (inner, resolved) => {
658
+ const raw = Array.isArray(resolved)
659
+ ? null
660
+ : (0, arrow_1.extractVectorBuffer)(resolved);
661
+ if (raw) {
662
+ return inner.nearestToRaw(raw.data, raw.dtype);
663
+ }
664
+ return inner.nearestTo(Float32Array.from(resolved));
665
+ };
653
666
  if (this.inner instanceof Promise) {
654
667
  const nativeQuery = this.inner.then(async (inner) => {
655
- if (vector instanceof Promise) {
656
- const arr = await vector.then((v) => Float32Array.from(v));
657
- return inner.nearestTo(arr);
658
- }
659
- else {
660
- return inner.nearestTo(Float32Array.from(vector));
661
- }
668
+ const resolved = vector instanceof Promise ? await vector : vector;
669
+ return callNearestTo(inner, resolved);
662
670
  });
663
671
  return new VectorQuery(nativeQuery);
664
672
  }
@@ -666,10 +674,8 @@ class Query extends StandardQueryBase {
666
674
  const res = (async () => {
667
675
  try {
668
676
  const v = await vector;
669
- const arr = Float32Array.from(v);
670
- //
671
677
  // biome-ignore lint/suspicious/noExplicitAny: we need to get the `inner`, but js has no package scoping
672
- const value = this.nearestTo(arr);
678
+ const value = this.nearestTo(v);
673
679
  const inner = value.inner;
674
680
  return inner;
675
681
  }
@@ -680,7 +686,7 @@ class Query extends StandardQueryBase {
680
686
  return new VectorQuery(res);
681
687
  }
682
688
  else {
683
- const vectorQuery = this.inner.nearestTo(Float32Array.from(vector));
689
+ const vectorQuery = callNearestTo(this.inner, vector);
684
690
  return new VectorQuery(vectorQuery);
685
691
  }
686
692
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.27.2-beta.1",
14
+ "version": "0.28.0-beta.0",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -102,13 +102,13 @@
102
102
  "reflect-metadata": "^0.2.2"
103
103
  },
104
104
  "optionalDependencies": {
105
- "@lancedb/lancedb-darwin-arm64": "0.27.2-beta.1",
106
- "@lancedb/lancedb-linux-x64-gnu": "0.27.2-beta.1",
107
- "@lancedb/lancedb-linux-arm64-gnu": "0.27.2-beta.1",
108
- "@lancedb/lancedb-linux-x64-musl": "0.27.2-beta.1",
109
- "@lancedb/lancedb-linux-arm64-musl": "0.27.2-beta.1",
110
- "@lancedb/lancedb-win32-x64-msvc": "0.27.2-beta.1",
111
- "@lancedb/lancedb-win32-arm64-msvc": "0.27.2-beta.1"
105
+ "@lancedb/lancedb-darwin-arm64": "0.28.0-beta.0",
106
+ "@lancedb/lancedb-linux-x64-gnu": "0.28.0-beta.0",
107
+ "@lancedb/lancedb-linux-arm64-gnu": "0.28.0-beta.0",
108
+ "@lancedb/lancedb-linux-x64-musl": "0.28.0-beta.0",
109
+ "@lancedb/lancedb-linux-arm64-musl": "0.28.0-beta.0",
110
+ "@lancedb/lancedb-win32-x64-msvc": "0.28.0-beta.0",
111
+ "@lancedb/lancedb-win32-arm64-msvc": "0.28.0-beta.0"
112
112
  },
113
113
  "peerDependencies": {
114
114
  "apache-arrow": ">=15.0.0 <=18.1.0"