-
Notifications
You must be signed in to change notification settings - Fork 11
Added refreshSchema()
#57
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
Conversation
packages/sqlite_async/lib/src/native/database/native_sqlite_connection_impl.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build checks are failing due to not supporting the lastest drift version. It's safe to increase the pana score threshold for now, until we properly fix the compatibility version later.
…and refreshSchema in `sqlite_database`.
refreshSchema()
and exclusiveLock()
to SqliteDatabaseMixin
refreshSchema()
and exclusiveLock()
to SqliteDatabaseMixin
refreshSchema()
@rkistner @stevensJourney I have removed the exclusiveLock implementation for the moment. If there are concerns in the powersync package, we can instead depend on a lock there. This version of the PR looks much cleaner than the first iteration so I am happy about it. |
I realised with this implementation, I don't have access to |
I think that's expected. Transactions can't span multiple connections, so there is no way to refresh the schema across connections in one transaction. And if you specifically want that command within a transaction, you can just call the PRAGMA statement directly. |
34ac213
to
92fdbb4
Compare
92fdbb4
to
31c6989
Compare
Updating the schema can causing queries and watch calls to become stale as they would use outdated source tables from a previous version of the schema. This PR adds the ability to explicitly update the version of the schema used for existing queries and watch calls.