File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/common/src/client Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
181
181
* Current connection status.
182
182
*/
183
183
currentStatus : SyncStatus ;
184
+ connectionOptions : PowerSyncConnectionOptions ;
184
185
185
186
sdkVersion : string ;
186
187
@@ -514,6 +515,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
514
515
*/
515
516
async connect ( connector : PowerSyncBackendConnector , options ?: PowerSyncConnectionOptions ) {
516
517
const resolvedOptions : InternalConnectionOptions = options ?? { } ;
518
+ this . connectionOptions = resolvedOptions ;
517
519
resolvedOptions . serializedSchema = this . schema . toJSON ( ) ;
518
520
519
521
return this . connectionManager . connect ( connector , resolvedOptions ) ;
@@ -592,6 +594,15 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
592
594
await this . iterateAsyncListeners ( async ( cb ) => cb . closed ?.( ) ) ;
593
595
}
594
596
597
+ /**
598
+ * Get the connection options used to connect to the PowerSync backend instance.
599
+ *
600
+ * @returns The connection options used to connect to the PowerSync backend instance.
601
+ */
602
+ getConnectionOptions ( ) : PowerSyncConnectionOptions | null {
603
+ return this . connectionOptions ?? null ;
604
+ }
605
+
595
606
/**
596
607
* Get upload queue size estimate and count.
597
608
*/
You can’t perform that action at this time.
0 commit comments