DatabaseNotificationCursor

configureQuery

Calls the provided callback to configure the underlying query for this DatabaseNotificationCursor instance.

Return: The DatabaseNotificationCursor instance.

fetch

Executes the configured query and stores the pagination and results internally. Maps the resulting rows into DatabaseNotification instances.

Return: The DatabaseNotificationCursor instance.

hasNext

Returns true if there are more pages left in the cursor.

Return: boolean

next

Advances the page of the cursor and fetches the results.

Return: The DatabaseNotificationCursor instance.

Throws: Megaphone.DatabaseNotificationCursor.MaximumPageReached

hasPrevious

Returns true if there are more pages before the current page in the cursor.

Return: boolean

previous

Reverses the page of the cursor and fetches the results.

Return: The DatabaseNotificationCursor instance.

Throws: Megaphone.DatabaseNotificationCursor.MinimumPageReached

markAllAsRead

Marks all the notifications under the cursor as read.

This marks all the notifications the cursor applies to, not just the currently loaded page.

Return: The DatabaseNotificationCursor instance.

deleteAll

Deletes all the notifications under the cursor.

This deletes all the notifications the cursor applies to, not just the currently loaded page.

Return: The DatabaseNotificationCursor instance.

Last updated