mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-09 13:22:58 +00:00
* Sets `"useCodeBlocks": true` * Adds a post-processing script `nodejs/typedoc_post_process.js` that puts the parameter description on the same line as the parameter name, like it is in our Python docs. This makes the text hierarchy clearer in those sections and also makes the sections shorter.
1.8 KiB
1.8 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / connect
Function: connect()
connect(uri, opts)
function connect(uri, opts?): 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. -
opts?:
Partial<ConnectionOptions>
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(opts)
function connect(opts): 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
- opts:
Partial<ConnectionOptions> &object
Returns
Promise<Connection>
See
ConnectionOptions for more details on the URI format.
Example
const conn = await connect({
uri: "/path/to/database",
storageOptions: {timeout: "60s"}
});