TTMSFNCCustomWebPushDB Class
Stores push subscriptions in a dataset and exposes operations to add, update, delete, find, and iterate them. Acts as the base class for the published subscription store component.
API unit family: TMS.TMSFNCWebPushDB
Inherits from: TComponent
Syntax
TTMSFNCCustomWebPushDB = class(TComponent)
Remarks
When no external data source is assigned the store creates and persists its own client dataset. Which columns are read and written is controlled through the field map exposed by the published descendant. Operations honor the active optional fields and raise the matching before/after events.
Methods
| Name | Description |
|---|---|
| AddSubscription | Adds a subscription identified only by its endpoint and keys, without user or browser identifiers. |
| DeleteSubscription | Removes every subscription that belongs to the given user. |
| GetEnumerator | Returns an enumerator that iterates the stored subscriptions, enabling for ... in iteration over the store. |
| SetUserActiveState | Sets the active state for every subscription that belongs to the given user. |
| TryFindSubscriptionByID | Attempts to retrieve the subscription payload for the given user. |
| UpdateSubscription | Replaces the stored subscription payload for the first record matching the given user. |