mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-06 20:02:58 +00:00
Support S3 and GCS from typescript SDK (#106)
This commit is contained in:
@@ -28,7 +28,8 @@ const { databaseNew, databaseTableNames, databaseOpenTable, tableCreate, tableSe
|
||||
* @param uri The uri of the database.
|
||||
*/
|
||||
export async function connect (uri: string): Promise<Connection> {
|
||||
return new Connection(uri)
|
||||
const db = await databaseNew(uri)
|
||||
return new Connection(db, uri)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,9 +39,9 @@ export class Connection {
|
||||
private readonly _uri: string
|
||||
private readonly _db: any
|
||||
|
||||
constructor (uri: string) {
|
||||
constructor (db: any, uri: string) {
|
||||
this._uri = uri
|
||||
this._db = databaseNew(uri)
|
||||
this._db = db
|
||||
}
|
||||
|
||||
get uri (): string {
|
||||
|
||||
Reference in New Issue
Block a user