Files
lancedb/docs/src/js/functions/connectCatalog.md
T
Colin Patrick McCabe d864e7198f feat!: list_databases returns an iterator (#4442)
CatalogConnection.list_databases should return an iterator so that users
don't have to manually re-implement pagination. For those who do want
more control over pagination, add num_page_results and page_token to the
Iterator object, and also allow the iterator object to be created at a
specific page token.
2026-10-05 19:41:53 -07:00

829 B

@lancedb/lancedb • Docs


@lancedb/lancedb / connectCatalog

Function: connectCatalog()

function connectCatalog(endpoint, options): Promise<Catalog>

Connect to an HTTP(S) catalog endpoint. Catalog requests omit database-selection headers; opened database connections inherit authentication and client options.

Parameters

Returns

Promise<Catalog>

Example

const catalog = await connectCatalog("https://my-server.example", { apiKey: "secret" });
const db = await catalog.createDatabase("analytics", { existOk: true });
for await (const name of catalog.listDatabases({ pageLimit: 20 })) {
  console.log(name);
}