Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote writes for offline databases #1932

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Conversation

levydsa
Copy link
Contributor

@levydsa levydsa commented Jan 23, 2025

Resolves #1920 by adding the capability of delegating writes a remote connection.

Following embedded replica convention, read_your_writes is enabled by default (after all write operations, sync_offline will be called), this can be disabled by adding .read_your_writes(false) to the builder.

libsql::Builder::new_synced_database(
    "local.db",
    "http://test.localhost:8080".to_string(),
    "".to_string(),
)
.remote_writes(true) // NEW!
.build()
.await?

@levydsa levydsa requested a review from penberg January 23, 2025 12:07
@penberg penberg added this pull request to the merge queue Jan 23, 2025
Merged via the queue into tursodatabase:main with commit 1e6af39 Jan 23, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embedded replica mode for new WAL sync
2 participants