Skip to content

View name override #20

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

Merged
merged 5 commits into from
Nov 17, 2023
Merged

View name override #20

merged 5 commits into from
Nov 17, 2023

Conversation

rkistner
Copy link
Contributor

@rkistner rkistner commented Nov 14, 2023

Supports:

  1. Overriding the view name for tables: Table(..., viewName: 'local_table').
  2. Updating the schema after the database has already been opened (but before connecting sync): await db.updateSchema(schema)

This allows having separate tables for a synced mode and a local-only mode, and moving data between the two - see the tests. The use case is a user first using the app completely offline (without registering an account), then potentially at a later stage connecting an account and syncing data, without the upload queue continuously growing in size before that.

Additional changes:

  1. Validate schema definitions for duplicates and invalid names.
  2. Support preserving local-only tables when clearing database: await db.disconnectAndClear(clearLocal: false).

Copy link
Contributor

@kobiebotha kobiebotha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

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.

2 participants