SQLPushStorage

SQLite-based implementation of PushStorage. This class directly extends SQLiteStorage with Push-specific functionality.

Constructors

Link copied to clipboard
constructor(config: SQLiteStorageConfig)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun clear()

Clear all data from the storage. This method clears all Push credential and notification tables.

Link copied to clipboard
open suspend override fun clearPushCredentials()

Clear all Push credentials from the storage.

Link copied to clipboard
open suspend override fun clearPushDeviceTokens()

Clear all Push device tokens from the storage.

Link copied to clipboard
open suspend override fun clearPushNotifications()

Clear all Push notifications from the storage.

Link copied to clipboard
open suspend override fun close()

Close the Push storage. This method closes the database connection.

Link copied to clipboard
open suspend override fun countPushNotifications(credentialId: String?): Int

Count the number of push notifications.

Link copied to clipboard
open suspend override fun getAllPushCredentials(): List<PushCredential>

Retrieve all stored push credentials.

Link copied to clipboard
open suspend override fun getAllPushDeviceTokens(): List<PushDeviceToken>

Retrieve all stored push device tokens.

Link copied to clipboard
open suspend override fun getAllPushNotifications(): List<PushNotification>

Retrieve all stored push notifications.

Link copied to clipboard
open suspend override fun getCredentialByIssuerAndAccount(issuer: String, accountName: String): PushCredential?

Retrieve a push credential by issuer and account name. Performs case-sensitive comparison to detect duplicate credentials.

Link copied to clipboard
open suspend override fun getCurrentPushDeviceToken(): PushDeviceToken?

Retrieve the current push device token.

Link copied to clipboard
open suspend override fun getNotificationByMessageId(messageId: String): PushNotification?

Retrieve a push notification by message ID.

Link copied to clipboard
open suspend override fun getOldestPushNotifications(limit: Int, credentialId: String?): List<PushNotification>

Retrieve the oldest push notifications.

Link copied to clipboard
open suspend override fun getPendingPushNotifications(): List<PushNotification>

Retrieve all pending push notifications.

Link copied to clipboard
open suspend override fun initialize()

Initialize the Push storage. This method initializes the database and tables.

Link copied to clipboard
open suspend override fun purgePushNotificationsByAge(maxAgeDays: Int, credentialId: String?): Int

Purge push notifications by age.

Link copied to clipboard
open suspend override fun purgePushNotificationsByCount(maxCount: Int, credentialId: String?): Int

Purge push notifications by count (removes oldest notifications when count exceeds the limit).

Link copied to clipboard
open suspend override fun removePushCredential(credentialId: String): Boolean

Remove a push credential by its ID.

Link copied to clipboard
open suspend override fun removePushNotification(notificationId: String): Boolean

Remove a push notification by its ID.

Link copied to clipboard
open suspend override fun removePushNotificationsForCredential(credentialId: String): Int

Remove all push notifications associated with a credential.

Link copied to clipboard
open suspend override fun retrievePushCredential(credentialId: String): PushCredential?

Retrieve a specific push credential by ID.

Link copied to clipboard
open suspend override fun retrievePushNotification(notificationId: String): PushNotification?

Retrieve a specific push notification by ID.

Link copied to clipboard
open suspend override fun storePushCredential(credential: PushCredential)

Store a push credential.

Link copied to clipboard
open suspend override fun storePushDeviceToken(token: PushDeviceToken)

Store a push device token.

Link copied to clipboard
open suspend override fun storePushNotification(notification: PushNotification)

Store a push notification.

Link copied to clipboard
open suspend override fun updatePushNotification(notification: PushNotification)

Update a push notification.