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<T>
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
• 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
Accessors
name
• get name(): string
Returns
string
Implementation of
Defined in
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
Defined in
countRows
▸ countRows(): Promise<number>
Returns the number of rows in this table.
Returns
Promise<number>
Implementation of
Defined in
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
Defined in
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
Defined in
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
Defined in
search
▸ 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
Defined in
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
Defined in
schema
▸ schema(): Promise<void>
Get the schema of the table
Returns
Promise<any>
Implementation of
Defined in
listIndices
▸ listIndices(): Promise<void>
List the indices of the table
Returns
Promise<any>
Implementation of
Defined in
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>