Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hasql.ListenNotify
Description
LISTEN
/NOTIFY
with hasql
.
Synopsis
- newtype Identifier = Identifier ByteString
- listen :: Identifier -> Statement () ()
- unlisten :: Identifier -> Statement () ()
- unlistenAll :: Statement () ()
- escapeIdentifier :: Text -> Session Identifier
- data Notification = Notification {}
- await :: Session Notification
- poll :: Session (Maybe Notification)
- backendPid :: Session CPid
- data Notify = Notify {}
- notify :: Statement Notify ()
Listen
newtype Identifier Source #
A Postgres identifier.
Constructors
Identifier ByteString |
Instances
Show Identifier Source # | |
Defined in Hasql.ListenNotify Methods showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
Eq Identifier Source # | |
Defined in Hasql.ListenNotify | |
Ord Identifier Source # | |
Defined in Hasql.ListenNotify Methods compare :: Identifier -> Identifier -> Ordering # (<) :: Identifier -> Identifier -> Bool # (<=) :: Identifier -> Identifier -> Bool # (>) :: Identifier -> Identifier -> Bool # (>=) :: Identifier -> Identifier -> Bool # max :: Identifier -> Identifier -> Identifier # min :: Identifier -> Identifier -> Identifier # |
listen :: Identifier -> Statement () () Source #
unlisten :: Identifier -> Statement () () Source #
Stop listening to a channel.
https://www.postgresql.org/docs/current/sql-unlisten.html
unlistenAll :: Statement () () Source #
Stop listening to all channels.
https://www.postgresql.org/docs/current/sql-unlisten.html
escapeIdentifier :: Text -> Session Identifier Source #
Escape a string as a Postgres identifier.
https://www.postgresql.org/docs/15/libpq-exec.html
data Notification Source #
An incoming notification.
Instances
await :: Session Notification Source #
Get the next notification received from the server.
https://www.postgresql.org/docs/current/libpq-notify.html
backendPid :: Session CPid Source #
Get the PID of the backend process handling this session. This can be used to filter out notifications that originate from this session.
https://www.postgresql.org/docs/current/libpq-status.html
Notify
An outgoing notification.
Instances
Generic Notify Source # | |||||
Defined in Hasql.ListenNotify Associated Types
| |||||
Show Notify Source # | |||||
Eq Notify Source # | |||||
type Rep Notify Source # | |||||
Defined in Hasql.ListenNotify type Rep Notify = D1 ('MetaData "Notify" "Hasql.ListenNotify" "hasql-listen-notify-0.1.0.1-AGBoAelEZqoEAHpvtqG4w2" 'False) (C1 ('MetaCons "Notify" 'PrefixI 'True) (S1 ('MetaSel ('Just "channel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) |