SyncOptions

data class SyncOptions(val newClientImplementation: Boolean = true, val crudThrottle: Duration = DEFAULT_CRUD_THROTTLE_MS.milliseconds, val retryDelay: Duration = DEFAULT_RETRY_DELAY_MS.milliseconds, val params: Map<String, JsonParam?> = emptyMap(), val userAgent: String = userAgent(), val clientConfiguration: SyncClientConfiguration = SyncClientConfiguration.ExtendedConfig {}, val includeDefaultStreams: Boolean = true, val checkpointMode: CheckpointMode = CheckpointMode.Legacy, val appMetadata: Map<String, String> = emptyMap())(source)

Options for PowerSyncDatabase.connect to customize the connection mechanism.

Constructors

Link copied to clipboard
constructor(newClientImplementation: Boolean = true, crudThrottle: Duration = DEFAULT_CRUD_THROTTLE_MS.milliseconds, retryDelay: Duration = DEFAULT_RETRY_DELAY_MS.milliseconds, params: Map<String, JsonParam?> = emptyMap(), userAgent: String = userAgent(), clientConfiguration: SyncClientConfiguration = SyncClientConfiguration.ExtendedConfig {}, includeDefaultStreams: Boolean = true, checkpointMode: CheckpointMode = CheckpointMode.Legacy, appMetadata: Map<String, String> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Additional application-specific metadata that will be displayed in PowerSync service logs.

Link copied to clipboard

The mode used to request checkpoint requests from the PowerSync service.

Link copied to clipboard

Allows configuring the HttpClient used for connecting to the PowerSync service.

Link copied to clipboard

The time between attempted CRUD uploads, defaults to 1 second.

Link copied to clipboard

Whether streams that have been defined with auto_subscribe: true should be synced even when they don't have an explicit subscription.

Link copied to clipboard

Enables the new client implementation written in Rust.

Link copied to clipboard

Additional unauthenticated parameters that can be referenced in sync streams.

Link copied to clipboard

The time to wait after a download or upload error before trying again, defaults to 5 seconds.

Link copied to clipboard

The user agent to use for requests made to the PowerSync service.