Skip to content

[Divergence] .NET SDK adds soft option to DisconnectAndClear for faster reconnects (powersync-dotnet #101) #653

Description

@benitav

What's changing: The .NET SDK adds a soft parameter to PowerSyncDatabase.DisconnectAndClear(). Enabling it deletes locally visible (ps_data__) tables but keeps internal sync state (ps_buckets, ps_oplog) intact, so a later Connect() call from the same user completes its first sync quickly instead of re-downloading everything. The Kotlin and Swift SDKs already support this option; JavaScript and Dart add it in the same release window (powersync-js#1111, powersync.dart#476).

High priority — existing docs are now inaccurate or incomplete

  • Reducing Usage (https://docs.powersync.com/resources/usage-and-billing/reducing-usage), "Avoiding Unnecessary Full Re-Syncs" section: presents disconnectAndClear() and disconnect() as the only two sign-out options, implying a returning user can only avoid a full re-sync by not clearing data at all. It doesn't mention the new soft option, which clears locally visible data while keeping internal sync state so a returning user's reconnect stays fast.

For reviewer consideration — worth documenting

  • No SDK reference or handling-writes page documents the DisconnectAndClear options (clearLocal, and now soft) in narrative form for .NET; the .NET SDK API Reference page only links out to the auto-generated docfx site. Raw Tables shows a Dart disconnectAndClear(soft: true) example for migrations, but nothing parallel exists for .NET.

Source PR: powersync-ja/powersync-dotnet#101 — merged 2026-09-17.

Filed automatically by Claude Code (claude-sonnet-5). A human must verify the scope, prepare the docs PR, and publish it only once this update has been released.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions