YapDatabase
YapDatabase copied to clipboard
Detecting at runtime if a view is out of sync with the DB
Due to programmer error, it seems one of our views had its logic updated without bumping the version tag. This manifested itself as a crash on launch. Obviously this is a mistake that we don't want to make again, but for additional safety, I am investigating ways to work around this type of error at runtime.
Two questions:
- Is there a way to detect that the view is out of sync programmatically at runtime?
- If a view is out of sync, what is the expected behavior? Is it a crash? Or is it undefined?
If I can answer these questions, I am hoping to submit a patch that will allow the views to fix themselves when this situation is encountered.
Any thoughts or insights?
Thanks Corey