Files
lancedb/docs/src/javascript/classes/LocalTable.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

5.4 KiB

vectordb / Exports / LocalTable

Class: LocalTable<T>

A LanceDB Table is the collection of Records. Each Record has one or more vector fields.

Type parameters

Name Type
T number[]

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new LocalTable<T>(tbl, name)

Type parameters

Name Type
T number[]

Parameters

Name Type
tbl any
name string

Defined in

index.ts:221

new LocalTable<T>(tbl, name, embeddings)

Type parameters

Name Type
T number[]

Parameters

Name Type Description
tbl any
name string
embeddings EmbeddingFunction<T> An embedding function to use when interacting with this table

Defined in

index.ts:227

Properties

_embeddings

Private Optional Readonly _embeddings: EmbeddingFunction<T>

Defined in

index.ts:219


_name

Private Readonly _name: string

Defined in

index.ts:218


_tbl

Private Readonly _tbl: any

Defined in

index.ts:217

Accessors

name

get name(): string

Returns

string

Implementation of

Table.name

Defined in

index.ts:234

Methods

add

add(data): Promise<number>

Insert records into this Table.

Parameters

Name Type Description
data Record<string, unknown>[] Records to be inserted into the Table

Returns

Promise<number>

The number of rows added to the table

Implementation of

Table.add

Defined in

index.ts:252


countRows

countRows(): Promise<number>

Returns the number of rows in this table.

Returns

Promise<number>

Implementation of

Table.countRows

Defined in

index.ts:278


createIndex

createIndex(indexParams): Promise<any>

Create an ANN index on this Table vector index.

See

VectorIndexParams.

Parameters

Name Type Description
indexParams IvfPQIndexConfig The parameters of this Index,

Returns

Promise<any>

Implementation of

Table.createIndex

Defined in

index.ts:271


delete

delete(filter): Promise<void>

Delete rows from this table.

Parameters

Name Type Description
filter string A filter in the same format used by a sql WHERE clause.

Returns

Promise<void>

Implementation of

Table.delete

Defined in

index.ts:287


overwrite

overwrite(data): Promise<number>

Insert records into this Table, replacing its contents.

Parameters

Name Type Description
data Record<string, unknown>[] Records to be inserted into the Table

Returns

Promise<number>

The number of rows added to the table

Implementation of

Table.overwrite

Defined in

index.ts:262


search(query): Query<T>

Creates a search query to find the nearest neighbors of the given search term

Parameters

Name Type Description
query T The query search term

Returns

Query<T>

Implementation of

Table.search

Defined in

index.ts:242