Files
lancedb/docs/src/javascript/classes/RemoteTable.md
2023-12-21 21:28:24 -08:00

7.0 KiB

vectordb / Exports / RemoteTable

Class: RemoteTable<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 RemoteTable<T>(client, name)

Type parameters

Name Type
T number[]

Parameters

Name Type
client HttpLancedbClient
name string

Defined in

remote/index.ts:186

new RemoteTable<T>(client, name, embeddings)

Type parameters

Name Type
T number[]

Parameters

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

Defined in

remote/index.ts:187

Accessors

name

get name(): string

Returns

string

Implementation of

Table.name

Defined in

remote/index.ts:194

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

remote/index.ts:293


countRows

countRows(): Promise<number>

Returns the number of rows in this table.

Returns

Promise<number>

Implementation of

Table.countRows

Defined in

remote/index.ts:290


createIndex

createIndex(metric_type, column): Promise<any>

Create an ANN index on this Table vector index.

Parameters

Name Type Description
metric_type string distance metric type, L2 or cosine or dot
column string the name of the column to be indexed

Returns

Promise<any>

Implementation of

Table.createIndex

Defined in

remote/index.ts:249


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

remote/index.ts:295


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

remote/index.ts:231


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

remote/index.ts:209


update

update(args): Promise<void>

Update zero to all rows depending on how many rows match the where clause.

Parameters

Name Type Description
args UpdateArgs or UpdateSqlArgs The query search arguments

Returns

Promise<any>

Implementation of

Table.search

Defined in

remote/index.ts:299


schema

schema(): Promise<void>

Get the schema of the table

Returns

Promise<any>

Implementation of

Table.search

Defined in

remote/index.ts:198


listIndices

listIndices(): Promise<void>

List the indices of the table

Returns

Promise<any>

Implementation of

Table.search

Defined in

remote/index.ts:319


indexStats

indexStats(indexUuid): Promise<void>

Get the indexed/unindexed of rows from the table

Parameters

Name Type Description
indexUuid string the uuid of the index

Returns

Promise<numIndexedRows> Promise<numUnindexedRows>

Implementation of

Table.search

Defined in

remote/index.ts:328