JetpackDao
DAO for handling JetpackEntity operations.
Functions
Permanently deletes a jetpack from the database.
Retrieves a specific jetpack by its ID.
Retrieves a list of jetpacks for a specific user that are not marked as deleted, ordered by the last updated timestamp in descending order.
Gets the most recent lastUpdated timestamp for a specific user's jetpacks. This can be used as a reference point for fetching only newer items from remote.
Retrieves a list of jetpacks for a specific user that need to be synced. A jetpack needs to be synced if it was updated after the last sync or if it is marked as needing sync.
Inserts a new jetpack into the database. If a jetpack with the same ID already exists, it will be replaced.
Marks a jetpack as synced by setting the needsSync flag to 0, the syncAction to 'NONE', and updating the lastSynced timestamp.
Marks a jetpack as deleted by setting the deleted flag to 1 and the needsSync flag to 1. Also sets the syncAction to 'DELETE'.
Updates an existing jetpack in the database.
Inserts or updates a jetpack in the database. If a jetpack with the same ID already exists, it will be updated; otherwise, a new entry will be created.
Upserts (insert or update) jetpacks from a remote source. If a jetpack already exists locally (matching ID), it will be updated with the remote version. If it doesn't exist locally, a new entry will be created.