Usage Examples
Code snippets and guidelines for common scenarios
Using transactions to group changes
This section is a work-in-progress. An example is coming soon.
Subscribe to changes in data
Use the watch
method to watch for changes to the dependent tables of any SQL query.
Insert, update, and delete data in the local database
Use execute
to run INSERT, UPDATE or DELETE queries.
Send changes in local data to your backend service
Override uploadData
to send local updates to your backend service. If you are using Supabase, see SupabaseConnector.kt
for a complete implementation.
Accessing PowerSync connection status information
This section is a work-in-progress. An example is coming soon.
Wait for the initial sync to complete
This section is a work-in-progress. An example is coming soon.
Using logging to troubleshoot issues
This is not yet implemented in the alpha release, but is on the roadmap for the beta release.
Last updated