Table of Contents

Interface IBucketStorageAdapter

Namespace
PowerSync.Common.Client.Sync.Bucket
Assembly
PowerSync.Common.dll
public interface IBucketStorageAdapter : ICloseable
Inherited Members

Properties

Events

Methods

Control(string, object?)

Invokes the powersync_control function for the sync client.

CurrentCheckpointRequestId()

Returns the highest checkpoint request ID that has been requested on this device.

GetClientId()

Get a unique client ID.

GetCrudBatch(int)
HandleCrudCheckpoint(long, long?)
HasCrud()
NextCheckpointRequestId()

Increments and returns the local checkpoint counter.

NextCrudItem()
ReadOrUpdateCheckpoint(string, long?)

Reads or updates the local checkpoint request ID counter.

SeedCheckpointRequestId(long)

Seeds the local checkpoint request ID counter using a response from the server.

Seeding the local counter achieves two goals:

  1. The service is allowed to forget our checkpoint counter, so we remind it whenever we connect.
  2. Checkpoint requests are scoped per user-and-device combo, but the local ID counter is scoped per-device. Seeding ensures we generate correctly incrementing IDs after switching user accounts.
UpdateLocalTarget(Func<Task<long>>)