mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-06 20:02:58 +00:00
[docs] fixed javascript docs for overloaded functions (#247)
Solves #244 :  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>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Interface: Connection
|
||||
|
||||
A LanceDB connection that allows you to open tables and create new ones.
|
||||
A LanceDB Connection that allows you to open tables and create new ones.
|
||||
|
||||
Connection could be local against filesystem or remote against a server.
|
||||
|
||||
@@ -14,124 +14,139 @@ Connection could be local against filesystem or remote against a server.
|
||||
|
||||
### Properties
|
||||
|
||||
- [uri](Connection.md#uri)
|
||||
|
||||
### Methods
|
||||
|
||||
- [createTable](Connection.md#createtable)
|
||||
- [createTableArrow](Connection.md#createtablearrow)
|
||||
- [dropTable](Connection.md#droptable)
|
||||
- [openTable](Connection.md#opentable)
|
||||
- [tableNames](Connection.md#tablenames)
|
||||
- [uri](Connection.md#uri)
|
||||
|
||||
## Properties
|
||||
|
||||
### createTable
|
||||
|
||||
• **createTable**: (`name`: `string`, `data`: `Record`<`string`, `unknown`\>[]) => `Promise`<[`Table`](Table.md)<`number`[]\>\> & <T\>(`name`: `string`, `data`: `Record`<`string`, `unknown`\>[], `embeddings`: [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\>) => `Promise`<[`Table`](Table.md)<`T`\>\> & <T\>(`name`: `string`, `data`: `Record`<`string`, `unknown`\>[], `embeddings?`: [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\>) => `Promise`<[`Table`](Table.md)<`T`\>\>
|
||||
|
||||
Creates a new Table and initialize it with new data.
|
||||
|
||||
**`Param`**
|
||||
|
||||
The name of the table.
|
||||
|
||||
**`Param`**
|
||||
|
||||
Non-empty Array of Records to be inserted into the Table
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:63](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### createTableArrow
|
||||
|
||||
• **createTableArrow**: (`name`: `string`, `table`: `Table`<`any`\>) => `Promise`<[`Table`](Table.md)<`number`[]\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`name`, `table`): `Promise`<[`Table`](Table.md)<`number`[]\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `name` | `string` |
|
||||
| `table` | `Table`<`any`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)<`number`[]\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:65](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### dropTable
|
||||
|
||||
• **dropTable**: (`name`: `string`) => `Promise`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`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:71](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L71)
|
||||
|
||||
___
|
||||
|
||||
### openTable
|
||||
|
||||
• **openTable**: (`name`: `string`) => `Promise`<[`Table`](Table.md)<`number`[]\>\> & <T\>(`name`: `string`, `embeddings`: [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\>) => `Promise`<[`Table`](Table.md)<`T`\>\> & <T\>(`name`: `string`, `embeddings?`: [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\>) => `Promise`<[`Table`](Table.md)<`T`\>\>
|
||||
|
||||
Open a table in the database.
|
||||
|
||||
**`Param`**
|
||||
|
||||
The name of the table.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:54](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### tableNames
|
||||
|
||||
• **tableNames**: () => `Promise`<`string`[]\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): `Promise`<`string`[]\>
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`<`string`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:47](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
### uri
|
||||
|
||||
• **uri**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:45](https://github.com/lancedb/lancedb/blob/bfb5400/node/src/index.ts#L45)
|
||||
[index.ts:45](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L45)
|
||||
|
||||
## Methods
|
||||
|
||||
### createTable
|
||||
|
||||
▸ **createTable**<`T`\>(`name`, `data`, `mode?`, `embeddings?`): `Promise`<[`Table`](Table.md)<`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`](../enums/WriteMode.md) | The write mode to use when creating the table. |
|
||||
| `embeddings?` | [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\> | An embedding function to use on this table |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)<`T`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:65](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### createTableArrow
|
||||
|
||||
▸ **createTableArrow**(`name`, `table`): `Promise`<[`Table`](Table.md)<`number`[]\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `name` | `string` |
|
||||
| `table` | `Table`<`any`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)<`number`[]\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:67](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L67)
|
||||
|
||||
___
|
||||
|
||||
### 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:73](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### openTable
|
||||
|
||||
▸ **openTable**<`T`\>(`name`, `embeddings?`): `Promise`<[`Table`](Table.md)<`T`\>\>
|
||||
|
||||
Open a table in the database.
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `name` | `string` | The name of the table. |
|
||||
| `embeddings?` | [`EmbeddingFunction`](EmbeddingFunction.md)<`T`\> | An embedding function to use on this table |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Table`](Table.md)<`T`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:55](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
### tableNames
|
||||
|
||||
▸ **tableNames**(): `Promise`<`string`[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:47](https://github.com/lancedb/lancedb/blob/7247834/node/src/index.ts#L47)
|
||||
|
||||
Reference in New Issue
Block a user