Skip to content

Add SQLDelight driver #231

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

Draft
wants to merge 4 commits into
base: refactor-drivers
Choose a base branch
from
Draft

Add SQLDelight driver #231

wants to merge 4 commits into from

Conversation

simolus3
Copy link
Contributor

This adds a new project in the integrations folder that provides a single class: PowerSyncDriver. That class implements the SqlDriver interface from SQLDelight by forwarding queries and statements to an opened PowerSync database.

Additionally, query listeners in that driver are backed by PowerSyncDatabase.onChange, meaning that all changes between the original powersync database and the SQLDelight wrapper are visible to each other and cause reactive updates. An obvious but still pretty cool result is that updates from the sync client also trigger updates to flows in SQLDelight.

I've added a test project to run unit tests against a SQLDelight database, but no real example yet.

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.

1 participant