SUSE / telemetry

Telemetry scaffolding
Apache License 2.0
0 stars 0 forks source link

Client Data Store Enhancements and Bug fixes #21

Closed rtamalin closed 5 months ago

rtamalin commented 5 months ago

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