Files
lancedb/docs/src/javascript/interfaces/Connection.md
2023-07-18 08:19:48 -07:00

3.1 KiB

vectordb / Exports / Connection

Interface: Connection

A LanceDB Connection that allows you to open tables and create new ones.

Connection could be local against filesystem or remote against a server.

Implemented by

Table of contents

Properties

Methods

Properties

uri

uri: string

Defined in

index.ts:70

Methods

createTable

createTable<T>(name, data, mode?, embeddings?): Promise<Table<T>>

Creates a new Table and initialize it with new data.

Type parameters

Name
T

Parameters

Name Type Description
name string The name of the table.
data Record<string, unknown>[] Non-empty Array of Records to be inserted into the table
mode? WriteMode The write mode to use when creating the table.
embeddings? EmbeddingFunction<T> An embedding function to use on this table

Returns

Promise<Table<T>>

Defined in

index.ts:90


createTableArrow

createTableArrow(name, table): Promise<Table<number[]>>

Parameters

Name Type
name string
table Table<any>

Returns

Promise<Table<number[]>>

Defined in

index.ts:92


dropTable

dropTable(name): Promise<void>

Drop an existing table.

Parameters

Name Type Description
name string The name of the table to drop.

Returns

Promise<void>

Defined in

index.ts:98


openTable

openTable<T>(name, embeddings?): Promise<Table<T>>

Open a table in the database.

Type parameters

Name
T

Parameters

Name Type Description
name string The name of the table.
embeddings? EmbeddingFunction<T> An embedding function to use on this table

Returns

Promise<Table<T>>

Defined in

index.ts:80


tableNames

tableNames(): Promise<string[]>

Returns

Promise<string[]>

Defined in

index.ts:72