Files
lancedb/docs/src/javascript/classes/LocalConnection.md
Leon Yee 9600a38ff0 [docs] fixed javascript docs for overloaded functions (#247)
Solves #244 :


![image](https://github.com/lancedb/lancedb/assets/43097991/d1fd9d2a-0d6a-4c16-a0ab-f460cc709349)

Problem was function overloading in the interface caused some weird
`typedoc` formatting, so breaking it apart into methods fixed the issue.

Also regenerated and updated javascript docs

---------

Co-authored-by: Tevin Wang <tevin@cmu.edu>
2023-07-04 13:07:34 -07:00

6.3 KiB

vectordb / Exports / LocalConnection

Class: LocalConnection

A connection to a LanceDB database.

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new LocalConnection(db, uri)

Parameters

Name Type
db any
uri string

Defined in

index.ts:132

Properties

_db

Private Readonly _db: any

Defined in

index.ts:130


_uri

Private Readonly _uri: string

Defined in

index.ts:129

Accessors

uri

get uri(): string

Returns

string

Implementation of

Connection.uri

Defined in

index.ts:137

Methods

createTable

createTable(name, data, mode?): Promise<Table<number[]>>

Creates a new Table and initialize it with new data.

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.

Returns

Promise<Table<number[]>>

Implementation of

Connection.createTable

Defined in

index.ts:177

createTable(name, data, mode): Promise<Table<number[]>>

Parameters

Name Type
name string
data Record<string, unknown>[]
mode WriteMode

Returns

Promise<Table<number[]>>

Implementation of

Connection.createTable

Defined in

index.ts:178

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>>

Implementation of

Connection.createTable

Defined in

index.ts:188


createTableArrow

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

Parameters

Name Type
name string
table Table<any>

Returns

Promise<Table<number[]>>

Implementation of

Connection.createTableArrow

Defined in

index.ts:201


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>

Implementation of

Connection.dropTable

Defined in

index.ts:211


openTable

openTable(name): Promise<Table<number[]>>

Open a table in the database.

Parameters

Name Type Description
name string The name of the table.

Returns

Promise<Table<number[]>>

Implementation of

Connection.openTable

Defined in

index.ts:153

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>>

Implementation of

Connection.openTable

Defined in

index.ts:160


tableNames

tableNames(): Promise<string[]>

Get the names of all tables in the database.

Returns

Promise<string[]>

Implementation of

Connection.tableNames

Defined in

index.ts:144