Table of Contents

Method SeedCheckpointRequestId

Namespace
PowerSync.Common.Client.Sync.Bucket
Assembly
PowerSync.Common.dll

SeedCheckpointRequestId(IBucketStorageAdapter, string)

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.
public static Task<string> SeedCheckpointRequestId(this IBucketStorageAdapter adapter, string serviceResponse)

Parameters

adapter IBucketStorageAdapter
serviceResponse string

Returns

Task<string>