@lancedb/lancedb 0.40.0-beta.5 → 0.40.0-beta.7
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/connection.d.ts +33 -0
- package/dist/connection.js +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/materialized_view.d.ts +7 -4
- package/dist/materialized_view.js +5 -2
- package/dist/native.d.ts +22 -0
- package/dist/native.js +52 -52
- package/dist/view.d.ts +32 -0
- package/dist/view.js +17 -0
- package/package.json +8 -8
package/dist/connection.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Job } from "./job";
|
|
|
4
4
|
import { MaterializedView, MaterializedViewSelect } from "./materialized_view";
|
|
5
5
|
import { Connection as LanceDbConnection } from "./native";
|
|
6
6
|
import type { CreateNamespaceResponse, DescribeNamespaceResponse, DropNamespaceResponse, JobInfo, ListNamespacesResponse, ListTablesResponse } from "./native";
|
|
7
|
+
import { ViewDescription } from "./view";
|
|
7
8
|
export type { CreateNamespaceResponse, DescribeNamespaceResponse, DropNamespaceResponse, ListNamespacesResponse, ListTablesResponse, };
|
|
8
9
|
import { Table } from "./table";
|
|
9
10
|
export interface CreateTableOptions {
|
|
@@ -298,6 +299,34 @@ export declare abstract class Connection {
|
|
|
298
299
|
* Rejects a table that exists but is not a materialized view.
|
|
299
300
|
*/
|
|
300
301
|
abstract dropMaterializedViewAsync(name: string, namespacePath?: string[]): Promise<Job>;
|
|
302
|
+
/**
|
|
303
|
+
* Create a view: a named query the database plans on every read.
|
|
304
|
+
*
|
|
305
|
+
* The query is planned once, at creation, so one that cannot be planned is
|
|
306
|
+
* rejected now rather than at the first read. A view holds no rows, and its
|
|
307
|
+
* readers see its sources as they are at read time.
|
|
308
|
+
*
|
|
309
|
+
* There is no replace: a name already taken is an error, and changing a
|
|
310
|
+
* view is a drop followed by a create.
|
|
311
|
+
*/
|
|
312
|
+
abstract createView(name: string, query: string, namespacePath?: string[]): Promise<ViewDescription>;
|
|
313
|
+
/**
|
|
314
|
+
* What this database records about the view named `name`: its defining
|
|
315
|
+
* query and the schema that query resolved to.
|
|
316
|
+
*/
|
|
317
|
+
abstract describeView(name: string, namespacePath?: string[]): Promise<ViewDescription>;
|
|
318
|
+
/**
|
|
319
|
+
* Drop the view named `name`.
|
|
320
|
+
*
|
|
321
|
+
* The tables it reads are untouched: a view holds no rows of its own.
|
|
322
|
+
*/
|
|
323
|
+
abstract dropView(name: string, namespacePath?: string[]): Promise<void>;
|
|
324
|
+
/**
|
|
325
|
+
* The names of the views in one namespace.
|
|
326
|
+
*
|
|
327
|
+
* Names only; a definition comes from {@link describeView}.
|
|
328
|
+
*/
|
|
329
|
+
abstract listViews(namespacePath?: string[]): Promise<string[]>;
|
|
301
330
|
abstract openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
|
|
302
331
|
/**
|
|
303
332
|
* Creates a new Table and initialize it with new data.
|
|
@@ -483,6 +512,10 @@ export declare class LocalConnection extends Connection {
|
|
|
483
512
|
listMaterializedViews(): Promise<string[]>;
|
|
484
513
|
dropMaterializedView(name: string, namespacePath?: string[]): Promise<void>;
|
|
485
514
|
dropMaterializedViewAsync(name: string, namespacePath?: string[]): Promise<Job>;
|
|
515
|
+
createView(name: string, query: string, namespacePath?: string[]): Promise<ViewDescription>;
|
|
516
|
+
describeView(name: string, namespacePath?: string[]): Promise<ViewDescription>;
|
|
517
|
+
dropView(name: string, namespacePath?: string[]): Promise<void>;
|
|
518
|
+
listViews(namespacePath?: string[]): Promise<string[]>;
|
|
486
519
|
listTables(namespacePathOrOptions?: string[] | Partial<ListTablesOptions>, options?: Partial<ListTablesOptions>): Promise<ListTablesResponse>;
|
|
487
520
|
openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
|
|
488
521
|
cloneTable(targetTableName: string, sourceUri: string, options?: {
|
package/dist/connection.js
CHANGED
|
@@ -9,6 +9,7 @@ const arrow_2 = require("./arrow");
|
|
|
9
9
|
const registry_1 = require("./embedding/registry");
|
|
10
10
|
const job_1 = require("./job");
|
|
11
11
|
const materialized_view_1 = require("./materialized_view");
|
|
12
|
+
const view_1 = require("./view");
|
|
12
13
|
const sanitize_1 = require("./sanitize");
|
|
13
14
|
const table_1 = require("./table");
|
|
14
15
|
/**
|
|
@@ -87,6 +88,18 @@ class LocalConnection extends Connection {
|
|
|
87
88
|
async dropMaterializedViewAsync(name, namespacePath) {
|
|
88
89
|
return new job_1.Job(await this.inner.dropMaterializedViewAsync(name, namespacePath ?? []));
|
|
89
90
|
}
|
|
91
|
+
async createView(name, query, namespacePath) {
|
|
92
|
+
return (0, view_1.viewDescriptionFromNative)(await this.inner.createView(name, query, namespacePath ?? []));
|
|
93
|
+
}
|
|
94
|
+
async describeView(name, namespacePath) {
|
|
95
|
+
return (0, view_1.viewDescriptionFromNative)(await this.inner.describeView(name, namespacePath ?? []));
|
|
96
|
+
}
|
|
97
|
+
async dropView(name, namespacePath) {
|
|
98
|
+
return this.inner.dropView(name, namespacePath ?? []);
|
|
99
|
+
}
|
|
100
|
+
async listViews(namespacePath) {
|
|
101
|
+
return this.inner.listViews(namespacePath ?? []);
|
|
102
|
+
}
|
|
90
103
|
async listTables(namespacePathOrOptions, options) {
|
|
91
104
|
// Detect if first argument is namespacePath array or options object
|
|
92
105
|
const namespacePath = Array.isArray(namespacePathOrOptions)
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { HeaderProvider } from "./header";
|
|
|
4
4
|
import type { BaseTokenizer } from "./indices";
|
|
5
5
|
import type { FtsToken } from "./table";
|
|
6
6
|
export { MaterializedView, MaterializedViewDefinition, MaterializedViewSelect, } from "./materialized_view";
|
|
7
|
+
export { ViewDescription } from "./view";
|
|
7
8
|
export { JsHeaderProvider as NativeJsHeaderProvider } from "./native.js";
|
|
8
9
|
export { instrumentLanceDbMetrics } from "./otel";
|
|
9
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";
|
|
@@ -2,13 +2,16 @@ import { RefreshMaterializedViewResult } from "./native";
|
|
|
2
2
|
import { Table } from "./table";
|
|
3
3
|
/** Schema metadata key holding a materialized view's definition. */
|
|
4
4
|
export declare const DEFINITION_META_KEY = "mv.definition";
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The newest stored layout this version reads: `{"format": N, "query": "<SQL>"}`,
|
|
7
|
+
* format 2 being a query with `GROUP BY`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFINITION_FORMAT = 2;
|
|
7
10
|
/**
|
|
8
11
|
* The query that defines a materialized view, as stored:
|
|
9
12
|
* `SELECT columns FROM [ns.]table [, function(args) AS alias | , UNNEST(column) AS alias]
|
|
10
|
-
* [WHERE predicate] [LIMIT n]`. A Function in `FROM`
|
|
11
|
-
* per element it returns.
|
|
13
|
+
* [WHERE predicate] [GROUP BY expr, ...] [LIMIT n]`. A Function in `FROM`
|
|
14
|
+
* position yields one row per element it returns.
|
|
12
15
|
*/
|
|
13
16
|
export interface MaterializedViewDefinition {
|
|
14
17
|
/** The defining query, in the canonical spelling the server stores. */
|
|
@@ -9,8 +9,11 @@ exports.definitionFromMetadata = definitionFromMetadata;
|
|
|
9
9
|
exports.definitionFromJson = definitionFromJson;
|
|
10
10
|
/** Schema metadata key holding a materialized view's definition. */
|
|
11
11
|
exports.DEFINITION_META_KEY = "mv.definition";
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The newest stored layout this version reads: `{"format": N, "query": "<SQL>"}`,
|
|
14
|
+
* format 2 being a query with `GROUP BY`.
|
|
15
|
+
*/
|
|
16
|
+
exports.DEFINITION_FORMAT = 2;
|
|
14
17
|
/**
|
|
15
18
|
* @internal Reject a numeric option N-API would otherwise silently coerce:
|
|
16
19
|
* `Infinity` reaches Rust as 0, `1.5` as 1.
|
package/dist/native.d.ts
CHANGED
|
@@ -56,6 +56,14 @@ export declare class Connection {
|
|
|
56
56
|
listMaterializedViews(): Promise<Array<string>>
|
|
57
57
|
/** Drop a materialized view. */
|
|
58
58
|
dropMaterializedView(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
|
|
59
|
+
/** Create a view: a named query planned on every read. */
|
|
60
|
+
createView(name: string, query: string, namespacePath?: Array<string> | undefined | null): Promise<ViewDescription>
|
|
61
|
+
/** What the database records about one view. */
|
|
62
|
+
describeView(name: string, namespacePath?: Array<string> | undefined | null): Promise<ViewDescription>
|
|
63
|
+
/** Drop a view. The tables it reads are untouched. */
|
|
64
|
+
dropView(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
|
|
65
|
+
/** The names of the views in one namespace. */
|
|
66
|
+
listViews(namespacePath?: Array<string> | undefined | null): Promise<Array<string>>
|
|
59
67
|
/** Start dropping a materialized view and return its cleanup job. */
|
|
60
68
|
dropMaterializedViewAsync(name: string, namespacePath?: Array<string> | undefined | null): Promise<Job>
|
|
61
69
|
openTable(name: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
|
|
@@ -1394,6 +1402,20 @@ export interface Version {
|
|
|
1394
1402
|
metadata: Record<string, string>
|
|
1395
1403
|
}
|
|
1396
1404
|
|
|
1405
|
+
/** What a database records about one view. */
|
|
1406
|
+
export interface ViewDescription {
|
|
1407
|
+
name: string
|
|
1408
|
+
namespacePath: Array<string>
|
|
1409
|
+
query: string
|
|
1410
|
+
defaultDatabase: string
|
|
1411
|
+
defaultNamespacePath: Array<string>
|
|
1412
|
+
/**
|
|
1413
|
+
* The view's schema as an empty Arrow IPC file, the way a table reports
|
|
1414
|
+
* its own.
|
|
1415
|
+
*/
|
|
1416
|
+
schema: Buffer
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1397
1419
|
/**
|
|
1398
1420
|
* Progress snapshot for a write operation, delivered to the JS callback
|
|
1399
1421
|
* passed to `Table.add`.
|
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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 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.7' && 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.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
package/dist/view.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Schema } from "apache-arrow";
|
|
2
|
+
import { ViewDescription as NativeViewDescription } from "./native";
|
|
3
|
+
/**
|
|
4
|
+
* What a database records about one view.
|
|
5
|
+
*
|
|
6
|
+
* A view holds no rows: it stores the statement that defines it and the
|
|
7
|
+
* schema that statement resolved to, so a reader sees its sources as they
|
|
8
|
+
* are at read time.
|
|
9
|
+
*/
|
|
10
|
+
export interface ViewDescription {
|
|
11
|
+
/** The view's name within its namespace. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** The namespace holding the view; empty is the root namespace. */
|
|
14
|
+
namespacePath: string[];
|
|
15
|
+
/** The defining query, as the database stores it. */
|
|
16
|
+
query: string;
|
|
17
|
+
/** The database that unqualified table names in {@link query} resolve against. */
|
|
18
|
+
defaultDatabase: string;
|
|
19
|
+
/**
|
|
20
|
+
* The namespace path those unqualified names resolve against; empty is the
|
|
21
|
+
* root namespace.
|
|
22
|
+
*
|
|
23
|
+
* Recorded with the view because it outlives the session that declared it:
|
|
24
|
+
* a reader resolving the query against its own default namespace could read
|
|
25
|
+
* a different table than the view was defined over.
|
|
26
|
+
*/
|
|
27
|
+
defaultNamespacePath: string[];
|
|
28
|
+
/** The schema the defining query resolved to when the view was created. */
|
|
29
|
+
schema: Schema;
|
|
30
|
+
}
|
|
31
|
+
/** Decode the schema the binding hands over as an Arrow IPC file. */
|
|
32
|
+
export declare function viewDescriptionFromNative(view: NativeViewDescription): ViewDescription;
|
package/dist/view.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.viewDescriptionFromNative = viewDescriptionFromNative;
|
|
6
|
+
const apache_arrow_1 = require("apache-arrow");
|
|
7
|
+
/** Decode the schema the binding hands over as an Arrow IPC file. */
|
|
8
|
+
function viewDescriptionFromNative(view) {
|
|
9
|
+
return {
|
|
10
|
+
name: view.name,
|
|
11
|
+
namespacePath: view.namespacePath,
|
|
12
|
+
query: view.query,
|
|
13
|
+
defaultDatabase: view.defaultDatabase,
|
|
14
|
+
defaultNamespacePath: view.defaultNamespacePath,
|
|
15
|
+
schema: (0, apache_arrow_1.tableFromIPC)(view.schema).schema,
|
|
16
|
+
};
|
|
17
|
+
}
|
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.7",
|
|
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.7",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.40.0-beta.7",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.40.0-beta.7",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.40.0-beta.7",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.40.0-beta.7",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.40.0-beta.7",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.40.0-beta.7"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@types/node": ">=22",
|