Skip to content

Commit f1d65e3

Browse files
committed
chore: rename variable to align with other sdks
1 parent 7f1e58b commit f1d65e3

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

core/src/commonMain/kotlin/com/powersync/PowerSyncDatabase.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public interface PowerSyncDatabase : Queries {
2929
*
3030
* Use @param [crudThrottleMs] to specify the time between CRUD operations. Defaults to 1000ms.
3131
* Use @param [retryDelayMs] to specify the delay between retries after failure. Defaults to 5000ms.
32+
* Use @param [params] to specify sync parameters from the client
3233
*
3334
* TODO: Internal Team - Status changes are reported on [statusStream].
3435
*/
@@ -37,7 +38,7 @@ public interface PowerSyncDatabase : Queries {
3738
connector: PowerSyncBackendConnector,
3839
crudThrottleMs: Long = 1000L,
3940
retryDelayMs: Long = 5000L,
40-
syncRulesParameters: Map<String, Any>? = null
41+
params: Map<String, Any>? = null
4142
)
4243

4344

core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ internal class PowerSyncDatabaseImpl(
8888
connector: PowerSyncBackendConnector,
8989
crudThrottleMs: Long,
9090
retryDelayMs: Long,
91-
syncRulesParameters: Map<String, Any>?)
91+
params: Map<String, Any>?)
9292
{
9393
// close connection if one is open
9494
disconnect()
@@ -100,7 +100,7 @@ internal class PowerSyncDatabaseImpl(
100100
uploadCrud = suspend { connector.uploadData(this) },
101101
retryDelayMs = retryDelayMs,
102102
logger = logger,
103-
syncRulesParameters = syncRulesParameters
103+
params = params
104104
)
105105

106106
syncJob = scope.launch {

core/src/commonMain/kotlin/com/powersync/sync/SyncStream.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ internal class SyncStream(
4343
private val uploadCrud: suspend () -> Unit,
4444
private val retryDelayMs: Long = 5000L,
4545
private val logger: Logger,
46-
private val syncRulesParameters: Map<String, Any>?
46+
private val params: Map<String, Any>?
4747
) {
4848
private var isUploadingCrud = AtomicBoolean(false)
4949

@@ -248,7 +248,7 @@ internal class SyncStream(
248248
val req = StreamingSyncRequest(
249249
buckets = initialBuckets.map { (bucket, after) -> BucketRequest(bucket, after) },
250250
clientId = clientId!!,
251-
parameters = convertMapToJson(syncRulesParameters)
251+
parameters = convertMapToJson(params)
252252
)
253253

254254
streamingSyncRequest(req).collect { value ->

0 commit comments

Comments
 (0)