@lancedb/lancedb 0.19.0-beta.9 → 0.19.1-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/index.d.ts +1 -1
- package/dist/index.js +4 -1
- package/dist/native.d.ts +13 -0
- package/dist/native.js +3 -1
- package/dist/table.d.ts +21 -4
- package/dist/table.js +7 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from "./connection";
|
|
2
2
|
import { ConnectionOptions } from "./native.js";
|
|
3
|
-
export { AddColumnsSql, ConnectionOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, OptimizeStats, CompactionStats, RemovalStats, } from "./native.js";
|
|
3
|
+
export { AddColumnsSql, ConnectionOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, OptimizeStats, CompactionStats, RemovalStats, Tags, TagContents, } from "./native.js";
|
|
4
4
|
export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
5
5
|
export { Connection, CreateTableOptions, TableNamesOptions, OpenTableOptions, } from "./connection";
|
|
6
6
|
export { ExecutableQuery, Query, QueryBase, VectorQuery, QueryExecutionOptions, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, FullTextQueryType, } from "./query";
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.packBits = exports.rerankers = exports.embedding = exports.MergeInsertBuilder = exports.Table = exports.Index = exports.FullTextQueryType = exports.MultiMatchQuery = exports.BoostQuery = exports.PhraseQuery = exports.MatchQuery = exports.RecordBatchIterator = exports.VectorQuery = exports.QueryBase = exports.Query = exports.Connection = exports.VectorColumnOptions = exports.MakeArrowTableOptions = exports.makeArrowTable = void 0;
|
|
5
|
+
exports.packBits = exports.rerankers = exports.embedding = exports.MergeInsertBuilder = exports.Table = exports.Index = exports.FullTextQueryType = exports.MultiMatchQuery = exports.BoostQuery = exports.PhraseQuery = exports.MatchQuery = exports.RecordBatchIterator = exports.VectorQuery = exports.QueryBase = exports.Query = exports.Connection = exports.VectorColumnOptions = exports.MakeArrowTableOptions = exports.makeArrowTable = exports.TagContents = exports.Tags = void 0;
|
|
6
6
|
exports.connect = connect;
|
|
7
7
|
const connection_1 = require("./connection");
|
|
8
8
|
const native_js_1 = require("./native.js");
|
|
9
|
+
var native_js_2 = require("./native.js");
|
|
10
|
+
Object.defineProperty(exports, "Tags", { enumerable: true, get: function () { return native_js_2.Tags; } });
|
|
11
|
+
Object.defineProperty(exports, "TagContents", { enumerable: true, get: function () { return native_js_2.TagContents; } });
|
|
9
12
|
var arrow_1 = require("./arrow");
|
|
10
13
|
Object.defineProperty(exports, "makeArrowTable", { enumerable: true, get: function () { return arrow_1.makeArrowTable; } });
|
|
11
14
|
Object.defineProperty(exports, "MakeArrowTableOptions", { enumerable: true, get: function () { return arrow_1.MakeArrowTableOptions; } });
|
package/dist/native.d.ts
CHANGED
|
@@ -361,9 +361,11 @@ export class Table {
|
|
|
361
361
|
dropColumns(columns: Array<string>): Promise<void>
|
|
362
362
|
version(): Promise<number>
|
|
363
363
|
checkout(version: number): Promise<void>
|
|
364
|
+
checkoutTag(tag: string): Promise<void>
|
|
364
365
|
checkoutLatest(): Promise<void>
|
|
365
366
|
listVersions(): Promise<Array<Version>>
|
|
366
367
|
restore(): Promise<void>
|
|
368
|
+
tags(): Promise<Tags>
|
|
367
369
|
optimize(olderThanMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null): Promise<OptimizeStats>
|
|
368
370
|
listIndices(): Promise<Array<IndexConfig>>
|
|
369
371
|
indexStats(indexName: string): Promise<IndexStatistics | null>
|
|
@@ -371,3 +373,14 @@ export class Table {
|
|
|
371
373
|
usesV2ManifestPaths(): Promise<boolean>
|
|
372
374
|
migrateManifestPathsV2(): Promise<void>
|
|
373
375
|
}
|
|
376
|
+
export class TagContents {
|
|
377
|
+
version: number
|
|
378
|
+
manifestSize: number
|
|
379
|
+
}
|
|
380
|
+
export class Tags {
|
|
381
|
+
list(): Promise<Record<string, TagContents>>
|
|
382
|
+
getVersion(tag: string): Promise<number>
|
|
383
|
+
create(tag: string, version: number): Promise<void>
|
|
384
|
+
delete(tag: string): Promise<void>
|
|
385
|
+
update(tag: string, version: number): Promise<void>
|
|
386
|
+
}
|
package/dist/native.js
CHANGED
|
@@ -319,7 +319,7 @@ if (!nativeBinding) {
|
|
|
319
319
|
}
|
|
320
320
|
throw new Error(`Failed to load native binding`);
|
|
321
321
|
}
|
|
322
|
-
const { Connection, Index, RecordBatchIterator, NativeMergeInsertBuilder, Query, VectorQuery, JsFullTextQuery, Reranker, RrfReranker, Table } = nativeBinding;
|
|
322
|
+
const { Connection, Index, RecordBatchIterator, NativeMergeInsertBuilder, Query, VectorQuery, JsFullTextQuery, Reranker, RrfReranker, Table, TagContents, Tags } = nativeBinding;
|
|
323
323
|
module.exports.Connection = Connection;
|
|
324
324
|
module.exports.Index = Index;
|
|
325
325
|
module.exports.RecordBatchIterator = RecordBatchIterator;
|
|
@@ -330,3 +330,5 @@ module.exports.JsFullTextQuery = JsFullTextQuery;
|
|
|
330
330
|
module.exports.Reranker = Reranker;
|
|
331
331
|
module.exports.RrfReranker = RrfReranker;
|
|
332
332
|
module.exports.Table = Table;
|
|
333
|
+
module.exports.TagContents = TagContents;
|
|
334
|
+
module.exports.Tags = Tags;
|
package/dist/table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Table as ArrowTable, Data, DataType, IntoVector, Schema } from "./arrow";
|
|
2
2
|
import { IndexOptions } from "./indices";
|
|
3
3
|
import { MergeInsertBuilder } from "./merge";
|
|
4
|
-
import { AddColumnsSql, IndexConfig, IndexStatistics, OptimizeStats, Table as _NativeTable } from "./native";
|
|
4
|
+
import { AddColumnsSql, IndexConfig, IndexStatistics, OptimizeStats, Tags, Table as _NativeTable } from "./native";
|
|
5
5
|
import { FullTextQuery, Query, VectorQuery } from "./query";
|
|
6
6
|
import { IntoSql } from "./util";
|
|
7
7
|
export { IndexConfig } from "./native";
|
|
@@ -314,7 +314,7 @@ export declare abstract class Table {
|
|
|
314
314
|
*
|
|
315
315
|
* Calling this method will set the table into time-travel mode. If you
|
|
316
316
|
* wish to return to standard mode, call `checkoutLatest`.
|
|
317
|
-
* @param {number} version The version to checkout
|
|
317
|
+
* @param {number | string} version The version to checkout, could be version number or tag
|
|
318
318
|
* @example
|
|
319
319
|
* ```typescript
|
|
320
320
|
* import * as lancedb from "@lancedb/lancedb"
|
|
@@ -330,7 +330,7 @@ export declare abstract class Table {
|
|
|
330
330
|
* console.log(await table.version()); // 2
|
|
331
331
|
* ```
|
|
332
332
|
*/
|
|
333
|
-
abstract checkout(version: number): Promise<void>;
|
|
333
|
+
abstract checkout(version: number | string): Promise<void>;
|
|
334
334
|
/**
|
|
335
335
|
* Checkout the latest version of the table. _This is an in-place operation._
|
|
336
336
|
*
|
|
@@ -342,6 +342,22 @@ export declare abstract class Table {
|
|
|
342
342
|
* List all the versions of the table
|
|
343
343
|
*/
|
|
344
344
|
abstract listVersions(): Promise<Version[]>;
|
|
345
|
+
/**
|
|
346
|
+
* Get a tags manager for this table.
|
|
347
|
+
*
|
|
348
|
+
* Tags allow you to label specific versions of a table with a human-readable name.
|
|
349
|
+
* The returned tags manager can be used to list, create, update, or delete tags.
|
|
350
|
+
*
|
|
351
|
+
* @returns {Tags} A tags manager for this table
|
|
352
|
+
* @example
|
|
353
|
+
* ```typescript
|
|
354
|
+
* const tagsManager = await table.tags();
|
|
355
|
+
* await tagsManager.create("v1", 1);
|
|
356
|
+
* const tags = await tagsManager.list();
|
|
357
|
+
* console.log(tags); // { "v1": { version: 1, manifestSize: ... } }
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
abstract tags(): Promise<Tags>;
|
|
345
361
|
/**
|
|
346
362
|
* Restore the table to the currently checked out version
|
|
347
363
|
*
|
|
@@ -429,10 +445,11 @@ export declare class LocalTable extends Table {
|
|
|
429
445
|
alterColumns(columnAlterations: ColumnAlteration[]): Promise<void>;
|
|
430
446
|
dropColumns(columnNames: string[]): Promise<void>;
|
|
431
447
|
version(): Promise<number>;
|
|
432
|
-
checkout(version: number): Promise<void>;
|
|
448
|
+
checkout(version: number | string): Promise<void>;
|
|
433
449
|
checkoutLatest(): Promise<void>;
|
|
434
450
|
listVersions(): Promise<Version[]>;
|
|
435
451
|
restore(): Promise<void>;
|
|
452
|
+
tags(): Promise<Tags>;
|
|
436
453
|
optimize(options?: Partial<OptimizeOptions>): Promise<OptimizeStats>;
|
|
437
454
|
listIndices(): Promise<IndexConfig[]>;
|
|
438
455
|
toArrow(): Promise<ArrowTable>;
|
package/dist/table.js
CHANGED
|
@@ -208,7 +208,10 @@ class LocalTable extends Table {
|
|
|
208
208
|
return await this.inner.version();
|
|
209
209
|
}
|
|
210
210
|
async checkout(version) {
|
|
211
|
-
|
|
211
|
+
if (typeof version === "string") {
|
|
212
|
+
return this.inner.checkoutTag(version);
|
|
213
|
+
}
|
|
214
|
+
return this.inner.checkout(version);
|
|
212
215
|
}
|
|
213
216
|
async checkoutLatest() {
|
|
214
217
|
await this.inner.checkoutLatest();
|
|
@@ -223,6 +226,9 @@ class LocalTable extends Table {
|
|
|
223
226
|
async restore() {
|
|
224
227
|
await this.inner.restore();
|
|
225
228
|
}
|
|
229
|
+
async tags() {
|
|
230
|
+
return await this.inner.tags();
|
|
231
|
+
}
|
|
226
232
|
async optimize(options) {
|
|
227
233
|
let cleanupOlderThanMs;
|
|
228
234
|
if (options?.cleanupOlderThan !== undefined &&
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.19.
|
|
14
|
+
"version": "0.19.1-beta.0",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -100,14 +100,14 @@
|
|
|
100
100
|
"reflect-metadata": "^0.2.2"
|
|
101
101
|
},
|
|
102
102
|
"optionalDependencies": {
|
|
103
|
-
"@lancedb/lancedb-darwin-x64": "0.19.
|
|
104
|
-
"@lancedb/lancedb-darwin-arm64": "0.19.
|
|
105
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.19.
|
|
106
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.19.
|
|
107
|
-
"@lancedb/lancedb-linux-x64-musl": "0.19.
|
|
108
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.19.
|
|
109
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.19.
|
|
110
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.19.
|
|
103
|
+
"@lancedb/lancedb-darwin-x64": "0.19.1-beta.0",
|
|
104
|
+
"@lancedb/lancedb-darwin-arm64": "0.19.1-beta.0",
|
|
105
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.19.1-beta.0",
|
|
106
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.19.1-beta.0",
|
|
107
|
+
"@lancedb/lancedb-linux-x64-musl": "0.19.1-beta.0",
|
|
108
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.19.1-beta.0",
|
|
109
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.19.1-beta.0",
|
|
110
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.19.1-beta.0"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
113
|
"apache-arrow": ">=15.0.0 <=18.1.0"
|