mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 06:19:57 +00:00
* Make `npm run docs` fail if there are any warnings. This will catch items missing from the API reference. * Add a check in our CI to make sure `npm run dos` runs without warnings and doesn't generate any new files (indicating it might be out-of-date. * Hide constructors that aren't user facing. * Remove unused enum `WriteMode`. Closes #2068
1.9 KiB
1.9 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / connect
Function: connect()
connect(uri, options)
function connect(uri, options?): Promise<Connection>
Connect to a LanceDB instance at the given URI.
Accepted formats:
/path/to/database- local databases3://bucket/path/to/databaseorgs://bucket/path/to/database- database on cloud storagedb://host:port- remote database (LanceDB cloud)
Parameters
-
uri:
stringThe uri of the database. If the database uri starts withdb://then it connects to a remote database. -
options?:
Partial<ConnectionOptions> The options to use when connecting to the database
Returns
Promise<Connection>
See
ConnectionOptions for more details on the URI format.
Examples
const conn = await connect("/path/to/database");
const conn = await connect(
"s3://bucket/path/to/database",
{storageOptions: {timeout: "60s"}
});
connect(options)
function connect(options): Promise<Connection>
Connect to a LanceDB instance at the given URI.
Accepted formats:
/path/to/database- local databases3://bucket/path/to/databaseorgs://bucket/path/to/database- database on cloud storagedb://host:port- remote database (LanceDB cloud)
Parameters
- options:
Partial<ConnectionOptions> &objectThe options to use when connecting to the database
Returns
Promise<Connection>
See
ConnectionOptions for more details on the URI format.
Example
const conn = await connect({
uri: "/path/to/database",
storageOptions: {timeout: "60s"}
});