You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Connecting via 'SyncStreamConnectionMethod.WEB_SOCKET' when using the 'CapacitorSQLiteAdapter' will result in poor sync performance. Use 'SyncStreamConnectionMethod.HTTP' (the default for native) instead.`
44
-
);
41
+
this.logger.log({
42
+
level: LogLevels.warn,
43
+
message: `Connecting via 'SyncStreamConnectionMethod.WEB_SOCKET' when using the 'CapacitorSQLiteAdapter' will result in poor sync performance. Use 'SyncStreamConnectionMethod.HTTP' (the default for native) instead.`
44
+
});
45
45
}
46
46
47
47
returnsuper.connect(connector,{
@@ -59,20 +59,23 @@ export class PowerSyncDatabase extends WebPowerSyncDatabase {
59
59
constplatform=Capacitor.getPlatform();
60
60
if(platform=='ios'||platform=='android'){
61
61
if(options.database.dbLocation){
62
-
options.logger?.log(
63
-
LogLevels.warn,
64
-
`
62
+
options.logger?.log({
63
+
level: LogLevels.warn,
64
+
message: `
65
65
dbLocation is ignored on iOS and Android platforms.
66
66
The database directory can be configured in the Capacitor project.
67
67
See https://github.com/capacitor-community/sqlite?tab=readme-ov-file#installation`
68
-
);
68
+
});
69
69
}
70
-
options.logger?.log(LogLevels.debug,`Using CapacitorSQLiteAdapter for platform: ${platform}`);
70
+
options.logger?.log({
71
+
level: LogLevels.debug,
72
+
message: `Using CapacitorSQLiteAdapter for platform: ${platform}`
73
+
});
71
74
returnnewCapacitorSQLiteAdapter({
72
75
...options.database
73
76
});
74
77
}else{
75
-
options.logger?.log(LogLevels.debug,`Using default web adapter for web platform`);
78
+
options.logger?.log({level: LogLevels.debug,message: `Using default web adapter for web platform`});
76
79
returnsuper.openDBAdapter(options);
77
80
}
78
81
}
@@ -107,12 +110,12 @@ export class PowerSyncDatabase extends WebPowerSyncDatabase {
107
110
if(this.isNativeCapacitorPlatform){
108
111
// We don't want to support multi-tab on mobile platforms.
109
112
// We technically can, but it's not a common use case and requires additional work/testing.
0 commit comments