@lancedb/lancedb 0.24.1 → 0.27.0-beta.1

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/native.d.ts CHANGED
@@ -548,10 +548,12 @@ export class Table {
548
548
  prewarmIndex(indexName: string): Promise<void>
549
549
  waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
550
550
  stats(): Promise<TableStatistics>
551
+ initialStorageOptions(): Promise<Record<string, string> | null>
552
+ latestStorageOptions(): Promise<Record<string, string> | null>
551
553
  update(onlyIf: string | undefined | null, columns: Array<[string, string]>): Promise<UpdateResult>
552
554
  query(): Query
553
555
  takeOffsets(offsets: Array<number>): TakeQuery
554
- takeRowIds(rowIds: Array<number>): TakeQuery
556
+ takeRowIds(rowIds: Array<bigint>): TakeQuery
555
557
  vectorSearch(vector: Float32Array): VectorQuery
556
558
  addColumns(transforms: Array<AddColumnsSql>): Promise<AddColumnsResult>
557
559
  alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
package/dist/table.d.ts CHANGED
@@ -278,9 +278,13 @@ export declare abstract class Table {
278
278
  /**
279
279
  * Create a query that returns a subset of the rows in the table.
280
280
  * @param rowIds The row ids of the rows to return.
281
+ *
282
+ * Row ids returned by `withRowId()` are `bigint`, so `bigint[]` is supported.
283
+ * For convenience / backwards compatibility, `number[]` is also accepted (for
284
+ * small row ids that fit in a safe integer).
281
285
  * @returns A builder that can be used to parameterize the query.
282
286
  */
283
- abstract takeRowIds(rowIds: number[]): TakeQuery;
287
+ abstract takeRowIds(rowIds: readonly (bigint | number)[]): TakeQuery;
284
288
  /**
285
289
  * Create a search query to find the nearest neighbors
286
290
  * of the given query
@@ -451,6 +455,29 @@ export declare abstract class Table {
451
455
  *
452
456
  */
453
457
  abstract stats(): Promise<TableStatistics>;
458
+ /**
459
+ * Get the initial storage options that were passed in when opening this table.
460
+ *
461
+ * For dynamically refreshed options (e.g., credential vending), use
462
+ * {@link Table.latestStorageOptions}.
463
+ *
464
+ * Warning: This is an internal API and the return value is subject to change.
465
+ *
466
+ * @returns The storage options, or undefined if no storage options were configured.
467
+ */
468
+ abstract initialStorageOptions(): Promise<Record<string, string> | null | undefined>;
469
+ /**
470
+ * Get the latest storage options, refreshing from provider if configured.
471
+ *
472
+ * This method is useful for credential vending scenarios where storage options
473
+ * may be refreshed dynamically. If no dynamic provider is configured, this
474
+ * returns the initial static options.
475
+ *
476
+ * Warning: This is an internal API and the return value is subject to change.
477
+ *
478
+ * @returns The storage options, or undefined if no storage options were configured.
479
+ */
480
+ abstract latestStorageOptions(): Promise<Record<string, string> | null | undefined>;
454
481
  }
455
482
  export declare class LocalTable extends Table {
456
483
  private readonly inner;
@@ -475,7 +502,7 @@ export declare class LocalTable extends Table {
475
502
  prewarmIndex(name: string): Promise<void>;
476
503
  waitForIndex(indexNames: string[], timeoutSeconds: number): Promise<void>;
477
504
  takeOffsets(offsets: number[]): TakeQuery;
478
- takeRowIds(rowIds: number[]): TakeQuery;
505
+ takeRowIds(rowIds: readonly (bigint | number)[]): TakeQuery;
479
506
  query(): Query;
480
507
  search(query: string | IntoVector | MultiVector | FullTextQuery, queryType?: string, ftsColumns?: string | string[]): VectorQuery | Query;
481
508
  vectorSearch(vector: IntoVector | MultiVector): VectorQuery;
@@ -493,6 +520,8 @@ export declare class LocalTable extends Table {
493
520
  toArrow(): Promise<ArrowTable>;
494
521
  indexStats(name: string): Promise<IndexStatistics | undefined>;
495
522
  stats(): Promise<TableStatistics>;
523
+ initialStorageOptions(): Promise<Record<string, string> | null | undefined>;
524
+ latestStorageOptions(): Promise<Record<string, string> | null | undefined>;
496
525
  mergeInsert(on: string | string[]): MergeInsertBuilder;
497
526
  /**
498
527
  * Check if the table uses the new manifest path scheme.
package/dist/table.js CHANGED
@@ -138,7 +138,22 @@ class LocalTable extends Table {
138
138
  return new query_1.TakeQuery(this.inner.takeOffsets(offsets));
139
139
  }
140
140
  takeRowIds(rowIds) {
141
- return new query_1.TakeQuery(this.inner.takeRowIds(rowIds));
141
+ const ids = rowIds.map((id) => {
142
+ if (typeof id === "bigint") {
143
+ return id;
144
+ }
145
+ if (!Number.isInteger(id)) {
146
+ throw new Error("Row id must be an integer (or bigint)");
147
+ }
148
+ if (id < 0) {
149
+ throw new Error("Row id cannot be negative");
150
+ }
151
+ if (!Number.isSafeInteger(id)) {
152
+ throw new Error("Row id is too large for number; use bigint instead");
153
+ }
154
+ return BigInt(id);
155
+ });
156
+ return new query_1.TakeQuery(this.inner.takeRowIds(ids));
142
157
  }
143
158
  query() {
144
159
  return new query_1.Query(this.inner);
@@ -267,6 +282,12 @@ class LocalTable extends Table {
267
282
  async stats() {
268
283
  return await this.inner.stats();
269
284
  }
285
+ async initialStorageOptions() {
286
+ return await this.inner.initialStorageOptions();
287
+ }
288
+ async latestStorageOptions() {
289
+ return await this.inner.latestStorageOptions();
290
+ }
270
291
  mergeInsert(on) {
271
292
  on = Array.isArray(on) ? on : [on];
272
293
  return new merge_1.MergeInsertBuilder(this.inner.mergeInsert(on), this.schema());
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.24.1",
14
+ "version": "0.27.0-beta.1",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -25,6 +25,7 @@
25
25
  "triples": {
26
26
  "defaults": false,
27
27
  "additional": [
28
+ "aarch64-apple-darwin",
28
29
  "x86_64-unknown-linux-gnu",
29
30
  "aarch64-unknown-linux-gnu",
30
31
  "x86_64-unknown-linux-musl",
@@ -35,6 +36,10 @@
35
36
  }
36
37
  },
37
38
  "license": "Apache-2.0",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/lancedb/lancedb"
42
+ },
38
43
  "devDependencies": {
39
44
  "@aws-sdk/client-dynamodb": "^3.33.0",
40
45
  "@aws-sdk/client-kms": "^3.33.0",
@@ -100,12 +105,13 @@
100
105
  "reflect-metadata": "^0.2.2"
101
106
  },
102
107
  "optionalDependencies": {
103
- "@lancedb/lancedb-linux-x64-gnu": "0.24.1",
104
- "@lancedb/lancedb-linux-arm64-gnu": "0.24.1",
105
- "@lancedb/lancedb-linux-x64-musl": "0.24.1",
106
- "@lancedb/lancedb-linux-arm64-musl": "0.24.1",
107
- "@lancedb/lancedb-win32-x64-msvc": "0.24.1",
108
- "@lancedb/lancedb-win32-arm64-msvc": "0.24.1"
108
+ "@lancedb/lancedb-darwin-arm64": "0.27.0-beta.1",
109
+ "@lancedb/lancedb-linux-x64-gnu": "0.27.0-beta.1",
110
+ "@lancedb/lancedb-linux-arm64-gnu": "0.27.0-beta.1",
111
+ "@lancedb/lancedb-linux-x64-musl": "0.27.0-beta.1",
112
+ "@lancedb/lancedb-linux-arm64-musl": "0.27.0-beta.1",
113
+ "@lancedb/lancedb-win32-x64-msvc": "0.27.0-beta.1",
114
+ "@lancedb/lancedb-win32-arm64-msvc": "0.27.0-beta.1"
109
115
  },
110
116
  "peerDependencies": {
111
117
  "apache-arrow": ">=15.0.0 <=18.1.0"