Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lancedb/lancedb

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lancedb/lancedb - npm Package Compare versions

Comparing version 0.11.0-beta.1 to 0.11.0

7

dist/index.d.ts
import { Connection } from "./connection";
import { ConnectionOptions } from "./native.js";
import { RemoteConnectionOptions } from "./remote";
export { WriteOptions, WriteMode, AddColumnsSql, ColumnAlteration, ConnectionOptions, IndexStatistics, IndexMetadata, IndexConfig, } from "./native.js";
export { WriteOptions, WriteMode, AddColumnsSql, ColumnAlteration, ConnectionOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, } from "./native.js";
export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";

@@ -34,3 +33,3 @@ export { Connection, CreateTableOptions, TableNamesOptions, } from "./connection";

*/
export declare function connect(uri: string, opts?: Partial<ConnectionOptions | RemoteConnectionOptions>): Promise<Connection>;
export declare function connect(uri: string, opts?: Partial<ConnectionOptions>): Promise<Connection>;
/**

@@ -54,4 +53,4 @@ * Connect to a LanceDB instance at the given URI.

*/
export declare function connect(opts: Partial<RemoteConnectionOptions | ConnectionOptions> & {
export declare function connect(opts: Partial<ConnectionOptions> & {
uri: string;
}): Promise<Connection>;

@@ -20,3 +20,2 @@ "use strict";

const native_js_1 = require("./native.js");
const remote_1 = require("./remote");
var native_js_2 = require("./native.js");

@@ -53,5 +52,2 @@ Object.defineProperty(exports, "WriteMode", { enumerable: true, get: function () { return native_js_2.WriteMode; } });

}
if (uri?.startsWith("db://")) {
return new remote_1.RemoteConnection(uri, opts);
}
opts = opts ?? {};

@@ -58,0 +54,0 @@ opts.storageOptions = (0, connection_1.cleanseStorageOptions)(opts.storageOptions);

@@ -6,2 +6,77 @@ /* tslint:disable */

/** Timeout configuration for remote HTTP client. */
export interface TimeoutConfig {
/**
* The timeout for establishing a connection in seconds. Default is 120
* seconds (2 minutes). This can also be set via the environment variable
* `LANCE_CLIENT_CONNECT_TIMEOUT`, as an integer number of seconds.
*/
connectTimeout?: number
/**
* The timeout for reading data from the server in seconds. Default is 300
* seconds (5 minutes). This can also be set via the environment variable
* `LANCE_CLIENT_READ_TIMEOUT`, as an integer number of seconds.
*/
readTimeout?: number
/**
* The timeout for keeping idle connections in the connection pool in seconds.
* Default is 300 seconds (5 minutes). This can also be set via the
* environment variable `LANCE_CLIENT_CONNECTION_TIMEOUT`, as an integer
* number of seconds.
*/
poolIdleTimeout?: number
}
/** Retry configuration for the remote HTTP client. */
export interface RetryConfig {
/**
* The maximum number of retries for a request. Default is 3. You can also
* set this via the environment variable `LANCE_CLIENT_MAX_RETRIES`.
*/
retries?: number
/**
* The maximum number of retries for connection errors. Default is 3. You
* can also set this via the environment variable `LANCE_CLIENT_CONNECT_RETRIES`.
*/
connectRetries?: number
/**
* The maximum number of retries for read errors. Default is 3. You can also
* set this via the environment variable `LANCE_CLIENT_READ_RETRIES`.
*/
readRetries?: number
/**
* The backoff factor to apply between retries. Default is 0.25. Between each retry
* the client will wait for the amount of seconds:
* `{backoff factor} * (2 ** ({number of previous retries}))`. So for the default
* of 0.25, the first retry will wait 0.25 seconds, the second retry will wait 0.5
* seconds, the third retry will wait 1 second, etc.
*
* You can also set this via the environment variable
* `LANCE_CLIENT_RETRY_BACKOFF_FACTOR`.
*/
backoffFactor?: number
/**
* The jitter to apply to the backoff factor, in seconds. Default is 0.25.
*
* A random value between 0 and `backoff_jitter` will be added to the backoff
* factor in seconds. So for the default of 0.25 seconds, between 0 and 250
* milliseconds will be added to the sleep between each retry.
*
* You can also set this via the environment variable
* `LANCE_CLIENT_RETRY_BACKOFF_JITTER`.
*/
backoffJitter?: number
/**
* The HTTP status codes for which to retry the request. Default is
* [429, 500, 502, 503].
*
* You can also set this via the environment variable
* `LANCE_CLIENT_RETRY_STATUSES`. Use a comma-separated list of integers.
*/
statuses?: Array<number>
}
export interface ClientConfig {
userAgent?: string
retryConfig?: RetryConfig
timeoutConfig?: TimeoutConfig
}
/** A description of an index currently configured on a column */

@@ -84,10 +159,12 @@ export interface IndexConfig {

/** The type of the index */
indexType?: string
/** The metadata for each index */
indices: Array<IndexMetadata>
indexType: string
/**
* The type of the distance function used by the index. This is only
* present for vector indices. Scalar and full text search indices do
* not have a distance function.
*/
distanceType?: string
/** The number of parts this index is split into. */
numIndices?: number
}
export interface IndexMetadata {
metricType?: string
indexType?: string
}
export interface ConnectionOptions {

@@ -112,2 +189,20 @@ /**

storageOptions?: Record<string, string>
/** (For LanceDB cloud only): configuration for the remote HTTP client. */
clientConfig?: ClientConfig
/**
* (For LanceDB cloud only): the API key to use with LanceDB Cloud.
*
* Can also be set via the environment variable `LANCEDB_API_KEY`.
*/
apiKey?: string
/**
* (For LanceDB cloud only): the region to use for LanceDB cloud.
* Defaults to 'us-east-1'.
*/
region?: string
/**
* (For LanceDB cloud only): the host to use for LanceDB cloud. Used
* for testing purposes.
*/
hostOverride?: string
}

@@ -114,0 +209,0 @@ /** Write mode for writing a table. */

@@ -13,3 +13,3 @@ {

],
"version": "0.11.0-beta.1",
"version": "0.11.0",
"main": "dist/index.js",

@@ -44,2 +44,3 @@ "exports": {

"@types/jest": "^29.1.2",
"@types/node": "^22.7.4",
"@types/tmp": "^0.2.6",

@@ -93,11 +94,10 @@ "apache-arrow-13": "npm:apache-arrow@13.0.0",

"dependencies": {
"axios": "^1.7.2",
"reflect-metadata": "^0.2.2"
},
"optionalDependencies": {
"@lancedb/lancedb-darwin-arm64": "0.11.0-beta.1",
"@lancedb/lancedb-linux-arm64-gnu": "0.11.0-beta.1",
"@lancedb/lancedb-darwin-x64": "0.11.0-beta.1",
"@lancedb/lancedb-linux-x64-gnu": "0.11.0-beta.1",
"@lancedb/lancedb-win32-x64-msvc": "0.11.0-beta.1"
"@lancedb/lancedb-darwin-arm64": "0.11.0",
"@lancedb/lancedb-linux-arm64-gnu": "0.11.0",
"@lancedb/lancedb-darwin-x64": "0.11.0",
"@lancedb/lancedb-linux-x64-gnu": "0.11.0",
"@lancedb/lancedb-win32-x64-msvc": "0.11.0"
},

@@ -104,0 +104,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc