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.
Returns the maximum stored server write timestamp for this user, including deleted rows.
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.
Clears needsSync and syncAction by ID and updates lastSynced, without checking which version was uploaded. An edit made during upload can lose its pending flags.
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.