Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for a push-only mode #5

Open
@marceljuenemann

Description

@marceljuenemann

Instead of a true offline-first paradigm, you can already leave out the pull option in order to only push updates to Supabase without ever fetching any data from Supabase. So you could use the SupabaseClient directly to fetch, and then use rxdb-supabase only to queue changes (possibly while offline) and then push them to Supabase when back online.

This path is currently untested, and because your RxDB is basically empty except for changes, this will always invoke the conflict handler, so you'll have to provide your own for this to work and you don't get the nice conflict resolution. A better way for this to work would be to first add every row you want to update to the RxDBvia the pull handler. This wouldn't actually be hard to support via thestream$ interface.

So when you want to do a change in push-only mode, you'd want to:

  1. Call a new method on SupabaseReplication to add theprevious state of the document to RxDB
  2. Wait for that sync to finish
  3. Then use the normal RxDB methods for updating

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp