Refactor TS client to use interface + implementation pattern (#226)

## What?
* Changed `Connection` and `Table` to interfaces
* Renamed original `Connection` and `Table` to `LocalConnection` and
`LocalTable`
This commit is contained in:
Rob Meng
2023-06-27 21:45:01 -04:00
committed by GitHub
parent eb5bcda337
commit 01abf82808
14 changed files with 1080 additions and 485 deletions

View File

@@ -18,7 +18,7 @@ npm install vectordb
const lancedb = require('vectordb');
const db = lancedb.connect('<PATH_TO_LANCEDB_DATASET>');
const table = await db.openTable('my_table');
const query = await table.search([0.1, 0.3]).setLimit(20).execute();
const query = await table.search([0.1, 0.3]).limit(20).execute();
console.log(results);
```
@@ -26,12 +26,6 @@ The [examples](./examples) folder contains complete examples.
## Development
The LanceDB javascript is built with npm:
```bash
npm run tsc
```
Run the tests with
```bash