PowerSyncBackendConnector

Implement this to connect an app backend.

The connector is responsible for:

  1. Creating credentials for connecting to the PowerSync service.

  2. Applying local changes against the backend application server.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract suspend fun fetchCredentials(): PowerSyncCredentials?

Get credentials for PowerSync.

Link copied to clipboard

Get credentials current cached, or fetch new credentials if none are available.

Link copied to clipboard

Immediately invalidate credentials.

Link copied to clipboard
open suspend fun prefetchCredentials(): Job?

Fetch a new set of credentials and cache it.

Link copied to clipboard
abstract suspend fun uploadData(database: PowerSyncDatabase)

Upload local changes to the app backend.