Something went wrong. Try again.
(READ ONLY) Margin is an open annotation layer for the internet. Powered by the AT Protocol.
margin.at
extension web atproto comments
Something went wrong. Try again.
1234567891011121314151617-- name: CreateNotification :execINSERT INTO notifications (recipient_did, actor_did, type, subject_uri, created_at)VALUES ($1, $2, $3, $4, $5);
-- name: GetNotifications :manySELECT id, recipient_did, actor_did, type, subject_uri, created_at, read_atFROM notificationsWHERE recipient_did = $1ORDER BY created_at DESCLIMIT $2 OFFSET $3;
-- name: GetUnreadNotificationCount :oneSELECT COUNT(*) FROM notifications WHERE recipient_did = $1 AND read_at IS NULL;
-- name: MarkNotificationsRead :execUPDATE notifications SET read_at = $1 WHERE recipient_did = $2 AND read_at IS NULL;