SupabaseUploader

open class SupabaseUploader(val supabaseClient: SupabaseClient) : MutationUploader(source)

Uploads local mutations to Supabase through PostgREST. Share an authenticated supabaseClient with SupabaseAuthenticator for bidirectional sync.

Constructors

Link copied to clipboard
constructor(supabaseClient: SupabaseClient)

Types

Link copied to clipboard

Properties

Link copied to clipboard
val supabaseClient: SupabaseClient

Functions

Link copied to clipboard
open suspend fun handleError(tx: CrudTransaction, entry: CrudEntry, exception: Exception, errorCode: String?)

Handles an error during the upload. This method can be overridden to log errors or customize error handling.

Link copied to clipboard
open suspend fun uploadCrudEntry(entry: CrudEntry)

Uses the PostgREST APIs to upload a given entry to the backend database.

Link copied to clipboard
open suspend override fun uploadMutations(onDatabase: PowerSyncDatabase)

Upload local changes to the app backend (in this case Supabase).