Implement SQLiteQueryExecutor method to create main compaction
Summary:
This differential introduces SQLiteQueryExecutor method to create main compaction backup. It uses sqlite backup API via sqlite orm in order to be able to detect if a
developer makes mistake and tries to call backup creation inside of a transaction. Additionally this differential introduces changes that allow us to create second sqlite orm
storage object. It is necessary to be able to create backup that is encrypted with encryption key.
Test Plan:
- Add a call to main compaction creation in SQLiteQueryExecutor::updateDraft and remove a call to replace draft.
- Update draft.
- Download application container from XCode or examine device file expolorer in Android studio.
- Ensure that backup file was created and it is encrypted.
- Repeat steps above with encryption disabled. Ensure database content matches backup content.
Reviewers: kamil, michal
Reviewed By: kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10503