Client Data Store Enhancements and Bug fixes #21
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Leverage foreign key cascaded delete constraints to ensure that deletion of reports triggers a cascaded delete of associated bundles, triggering cascaded deletes of associated bundles.
To support this we need to ensure that SQLite3 foreign_key processing is enabled when we open the SQLite3 based client data store. Similarly we want to enable Write Ahead Log (WAL) based journalling mode for our data store. These options will be automatically included in the SQLite3 data source specification if not already provided.
Cleanup the TelemetryProcessor and associated TelemetryCommon interface definitions, leveraging variadic functions to eliminate multiple similar methods. Similarly for the DatabaseStorer interface. Update associated implementations to match revised interface definitions and remove any newly redundant methods.
Implement helper functions that can be used to generate the SQL queries needed to populate the row structures of a table, or count the number of matching rows.
Update test cases to ensure that deleting a report triggers appropriate cascaded deletes that remove associated bundles and items.
Relates: #19
Closes: #20 #18