DatabaseBackup
Pure rules for backing up and restoring the app database: file naming, header validation and staging paths.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Bytes of the SQLite file header needed to read the magic string and user_version.
Link copied to clipboard
Must equal @Database(version) on MeshtasticDatabase; a jvmTest opens a real database and checks it.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Where a validated restore for the database at dbFile waits until that database is next opened.
Link copied to clipboard
fun validateHeader(header: ByteArray, expectedVersion: Int = SCHEMA_VERSION): DatabaseBackup.Validation
Checks the SQLite magic string and that user_version (where Room stores the schema version) matches.