@lancedb/lancedb 0.41.0-beta.7 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +13 -0
- package/dist/arrow.d.ts +1 -0
- package/dist/arrow.js +16 -5
- package/dist/blob.d.ts +24 -1
- package/dist/blob.js +56 -5
- package/dist/catalog.d.ts +6 -1
- package/dist/catalog.js +6 -2
- package/dist/connection.d.ts +26 -79
- package/dist/connection.js +28 -26
- package/dist/embedding/transformers.js +4 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -5
- package/dist/indices.d.ts +2 -1
- package/dist/job.d.ts +8 -5
- package/dist/job.js +8 -5
- package/dist/materialized_view.d.ts +7 -3
- package/dist/materialized_view.js +7 -4
- package/dist/merge.d.ts +7 -7
- package/dist/merge.js +8 -8
- package/dist/native.d.ts +128 -129
- package/dist/native.js +53 -52
- package/dist/query.d.ts +68 -20
- package/dist/query.js +181 -36
- package/dist/table.d.ts +64 -55
- package/dist/table.js +26 -20
- package/package.json +10 -9
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.41.0
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
79
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
98
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
123
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
142
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
162
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
181
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
204
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
222
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
241
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
265
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
284
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
309
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
328
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
349
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
368
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
389
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
408
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
429
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
448
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
469
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
488
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
508
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
527
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
551
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
570
|
+
if (bindingPackageVersion !== '0.41.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.41.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.41.0
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
589
|
+
if (bindingPackageVersion !== '0.41.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.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -687,6 +687,7 @@ module.exports.TagContents = nativeBinding.TagContents;
|
|
|
687
687
|
module.exports.Tags = nativeBinding.Tags;
|
|
688
688
|
module.exports.TakeQuery = nativeBinding.TakeQuery;
|
|
689
689
|
module.exports.VectorQuery = nativeBinding.VectorQuery;
|
|
690
|
+
module.exports.experimentalFunctionsEnabled = nativeBinding.experimentalFunctionsEnabled;
|
|
690
691
|
module.exports.lancedbMetricsCatalog = nativeBinding.lancedbMetricsCatalog;
|
|
691
692
|
module.exports.permutationBuilder = nativeBinding.permutationBuilder;
|
|
692
693
|
module.exports.registerLancedbMetricsRecorder = nativeBinding.registerLancedbMetricsRecorder;
|
package/dist/query.d.ts
CHANGED
|
@@ -3,6 +3,21 @@ import { type IvfPqOptions } from "./indices";
|
|
|
3
3
|
import { JsFullTextQuery, RecordBatchIterator as NativeBatchIterator, Query as NativeQuery, Table as NativeTable, TakeQuery as NativeTakeQuery, VectorQuery as NativeVectorQuery } from "./native";
|
|
4
4
|
import { Reranker } from "./rerankers";
|
|
5
5
|
export declare function RecordBatchIterator(promisedInner: Promise<NativeBatchIterator>): AsyncGenerator<RecordBatch<any>, void, unknown>;
|
|
6
|
+
/**
|
|
7
|
+
* How a query returns blob v2 columns. See {@link QueryExecutionOptions.blobMode}.
|
|
8
|
+
*/
|
|
9
|
+
export type BlobMode = "descriptions" | "bytes";
|
|
10
|
+
/**
|
|
11
|
+
* The table a query reads, and the parts of the query that decide which blob
|
|
12
|
+
* columns `blobMode: "bytes"` fills in.
|
|
13
|
+
*
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface QueryBlobContext {
|
|
17
|
+
table: NativeTable;
|
|
18
|
+
withRowId: boolean;
|
|
19
|
+
projection?: [string, string][];
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* Options that control the behavior of a particular query execution
|
|
8
23
|
*/
|
|
@@ -18,6 +33,33 @@ export interface QueryExecutionOptions {
|
|
|
18
33
|
* Timeout for query execution in milliseconds
|
|
19
34
|
*/
|
|
20
35
|
timeoutMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* How to return blob v2 columns. Applies to `toArrow()` and `toArray()`.
|
|
38
|
+
*
|
|
39
|
+
* - `"descriptions"` (default): each blob is a descriptor. Read the bytes
|
|
40
|
+
* with {@link Table.fetchBlobs} or {@link Table.fetchBlobFiles}.
|
|
41
|
+
* - `"bytes"`: each blob column, including blobs nested in structs, holds
|
|
42
|
+
* the bytes as `LargeBinary`. The query also reads `_rowid` to fetch them, and
|
|
43
|
+
* leaves it out of the result unless {@link QueryBase.withRowId} was
|
|
44
|
+
* called. All the bytes are held in memory.
|
|
45
|
+
*
|
|
46
|
+
* Selecting a parent struct or directly aliasing a blob or struct also returns
|
|
47
|
+
* bytes. Blobs inside lists keep their descriptors. Arbitrary projection
|
|
48
|
+
* expressions are not materialized as bytes.
|
|
49
|
+
*
|
|
50
|
+
* The rows and the bytes come from the same table version. If the table
|
|
51
|
+
* changes while the query runs, the query runs again, up to three times.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const rows = await table
|
|
56
|
+
* .query()
|
|
57
|
+
* .select(["id", "image"])
|
|
58
|
+
* .toArray({ blobMode: "bytes" });
|
|
59
|
+
* const image: Uint8Array | null = rows[0].image;
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
blobMode?: BlobMode;
|
|
21
63
|
}
|
|
22
64
|
export type AnalyzePlanDistributedMetrics = "aggregate" | "per_worker" | "full";
|
|
23
65
|
export interface ColumnOrdering {
|
|
@@ -49,7 +91,11 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
49
91
|
/**
|
|
50
92
|
* @hidden
|
|
51
93
|
*/
|
|
52
|
-
protected
|
|
94
|
+
protected blobContext?: QueryBlobContext;
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
protected constructor(inner?: NativeQueryType | Promise<NativeQueryType>, blobContext?: QueryBlobContext);
|
|
53
99
|
/**
|
|
54
100
|
* @hidden
|
|
55
101
|
*/
|
|
@@ -102,7 +148,7 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
102
148
|
/**
|
|
103
149
|
* @hidden
|
|
104
150
|
*/
|
|
105
|
-
protected nativeExecute(options?: Partial<QueryExecutionOptions
|
|
151
|
+
protected nativeExecute(options?: Partial<QueryExecutionOptions>, withRowId?: boolean): Promise<NativeBatchIterator>;
|
|
106
152
|
/**
|
|
107
153
|
* Execute the query and return the results as an @see {@link AsyncIterator}
|
|
108
154
|
* of @see {@link RecordBatch}.
|
|
@@ -125,6 +171,8 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
125
171
|
* Empty results retain the query's output schema.
|
|
126
172
|
*/
|
|
127
173
|
toArrow(options?: Partial<QueryExecutionOptions>): Promise<ArrowTable>;
|
|
174
|
+
private collect;
|
|
175
|
+
private blobBytesContext;
|
|
128
176
|
/** Collect the results as an array of objects. */
|
|
129
177
|
toArray(options?: Partial<QueryExecutionOptions>): Promise<any[]>;
|
|
130
178
|
/**
|
|
@@ -185,7 +233,7 @@ export declare class QueryBase<NativeQueryType extends NativeQuery | NativeVecto
|
|
|
185
233
|
outputSchema(): Promise<import("./arrow").Schema>;
|
|
186
234
|
}
|
|
187
235
|
export declare class StandardQueryBase<NativeQueryType extends NativeQuery | NativeVectorQuery> extends QueryBase<NativeQueryType> implements ExecutableQuery {
|
|
188
|
-
constructor(inner?: NativeQueryType | Promise<NativeQueryType
|
|
236
|
+
constructor(inner?: NativeQueryType | Promise<NativeQueryType>, blobContext?: QueryBlobContext);
|
|
189
237
|
/**
|
|
190
238
|
* A filter statement to be applied to this query.
|
|
191
239
|
*
|
|
@@ -235,25 +283,25 @@ export declare class StandardQueryBase<NativeQueryType extends NativeQuery | Nat
|
|
|
235
283
|
*/
|
|
236
284
|
fastSearch(): this;
|
|
237
285
|
/**
|
|
238
|
-
* Control
|
|
286
|
+
* Control RTE read routing for this query.
|
|
239
287
|
*
|
|
240
|
-
* By default (unset), when the table carries
|
|
241
|
-
* {@link Table#
|
|
288
|
+
* By default (unset), when the table carries an RTE write spec (see
|
|
289
|
+
* {@link Table#enableRTE}), reads are routed through the LSM scanner so
|
|
242
290
|
* they also return data written via the `mergeInsert` LSM path that has not yet
|
|
243
291
|
* been compacted into the base table (the active/frozen in-memory memtables and
|
|
244
|
-
* the
|
|
292
|
+
* the SSTables), deduplicated by primary key; a table without a spec
|
|
245
293
|
* reads the base table.
|
|
246
294
|
*
|
|
247
295
|
* @param enable - `true` forces the LSM scanner and errors if the table has no
|
|
248
|
-
*
|
|
296
|
+
* RTE write spec. `false` bypasses the RTE and reads the base table only,
|
|
249
297
|
* even when a spec is present.
|
|
250
298
|
*
|
|
251
299
|
* Note: the LSM scanner does not support every query shape (e.g. reranking,
|
|
252
|
-
* hybrid search, `orderBy`). On
|
|
253
|
-
* `
|
|
254
|
-
* un-compacted
|
|
300
|
+
* hybrid search, `orderBy`). On an RTE table those shapes error unless
|
|
301
|
+
* `useRTE(false)` is set, because a base-only read would silently exclude
|
|
302
|
+
* un-compacted RTE data.
|
|
255
303
|
*/
|
|
256
|
-
|
|
304
|
+
useRTE(enable: boolean): this;
|
|
257
305
|
}
|
|
258
306
|
/**
|
|
259
307
|
* An interface for a query that can be executed
|
|
@@ -275,7 +323,7 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
275
323
|
/**
|
|
276
324
|
* @hidden
|
|
277
325
|
*/
|
|
278
|
-
constructor(inner: NativeVectorQuery | Promise<NativeVectorQuery
|
|
326
|
+
constructor(inner: NativeVectorQuery | Promise<NativeVectorQuery>, blobContext?: QueryBlobContext);
|
|
279
327
|
/**
|
|
280
328
|
* @hidden
|
|
281
329
|
*/
|
|
@@ -316,7 +364,7 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
316
364
|
* probing may continue when too few candidates are found.
|
|
317
365
|
* Any explicit effort, including 0.5, overrides nprobes in either call order.
|
|
318
366
|
* Explicit minimum and maximum bounds still apply. This is not a recall
|
|
319
|
-
* guarantee and does not change refinement or HNSW ef. The
|
|
367
|
+
* guarantee and does not change refinement or HNSW ef. The RTE LSM
|
|
320
368
|
* scanner does not yet support this option.
|
|
321
369
|
*
|
|
322
370
|
* @example
|
|
@@ -457,17 +505,17 @@ export declare function createAutoQuery(table: NativeTable, query: string, colum
|
|
|
457
505
|
* @hideconstructor
|
|
458
506
|
*/
|
|
459
507
|
export declare class TakeQuery extends QueryBase<NativeTakeQuery> {
|
|
460
|
-
constructor(inner: NativeTakeQuery);
|
|
508
|
+
constructor(inner: NativeTakeQuery, blobContext?: QueryBlobContext);
|
|
461
509
|
/**
|
|
462
|
-
* Control
|
|
510
|
+
* Control RTE read routing for this take query.
|
|
463
511
|
*
|
|
464
|
-
* `false` bypasses the
|
|
512
|
+
* `false` bypasses the RTE and reads the base table only — the escape hatch,
|
|
465
513
|
* since take-by-row-id/offset is not supported on the LSM scanner and, on a
|
|
466
|
-
*
|
|
514
|
+
* RTE table, auto-routes to it and errors otherwise.
|
|
467
515
|
*
|
|
468
516
|
* @param enable - `false` reads the base table only.
|
|
469
517
|
*/
|
|
470
|
-
|
|
518
|
+
useRTE(enable: boolean): this;
|
|
471
519
|
}
|
|
472
520
|
/**
|
|
473
521
|
* A builder for automatic string searches.
|
|
@@ -482,7 +530,7 @@ export declare class AutoQuery extends StandardQueryBase<NativeQuery | NativeVec
|
|
|
482
530
|
private readonly createInner;
|
|
483
531
|
private readonly calls;
|
|
484
532
|
/** @hidden */
|
|
485
|
-
constructor(createInner: () => Promise<NativeQuery | NativeVectorQuery
|
|
533
|
+
constructor(createInner: () => Promise<NativeQuery | NativeVectorQuery>, blobContext?: QueryBlobContext);
|
|
486
534
|
/** @hidden */
|
|
487
535
|
protected doCall(fn: (inner: NativeQuery | NativeVectorQuery) => void): void;
|
|
488
536
|
/** @hidden */
|