File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ interface SQLiteCloudClientConfig {
1616export class SQLiteCloudClient {
1717 private connectionString : string
1818 private fetch : Fetch
19+ private _db : Database
1920
2021 constructor ( config : SQLiteCloudClientConfig | string ) {
2122 let connectionString : string
@@ -31,6 +32,7 @@ export class SQLiteCloudClient {
3132 this . connectionString = connectionString
3233 this . fetch = fetchWithAuth ( this . connectionString , customFetch )
3334 this . defaultDb = getDefaultDatabase ( this . connectionString ) ?? ''
35+ this . _db = new Database ( this . connectionString )
3436 }
3537
3638 async sql ( sql : TemplateStringsArray | string | SQLiteCloudCommand , ...values : any [ ] ) {
@@ -48,7 +50,7 @@ export class SQLiteCloudClient {
4850 }
4951
5052 get db ( ) {
51- return new Database ( this . connectionString )
53+ return this . _db
5254 }
5355
5456 get weblite ( ) {
You can’t perform that action at this time.
0 commit comments