HomePhabricator
Diffusion Comm bfc117bb4921

Implement SQLiteQueryExecutor method to create main compaction

Description

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:

  1. Add a call to main compaction creation in SQLiteQueryExecutor::updateDraft and remove a call to replace draft.
  2. Update draft.
  3. Download application container from XCode or examine device file expolorer in Android studio.
  4. Ensure that backup file was created and it is encrypted.
  5. 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

Details

Provenance
marcinAuthored on Jan 2 2024, 1:26 AM
Reviewer
kamil
Differential Revision
D10503: Implement SQLiteQueryExecutor method to create main compaction
Parents
rCOMM3be9c9a59eb6: Use SQLCipher as SQLite engine on web
Branches
Unknown
Tags
Unknown