hpqtypes-1.4.3: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell98

Database.PostgreSQL.PQTypes.Notification

Synopsis

Documentation

newtype Channel Source

Representation of notification channel.

Constructors

Channel (RawSQL ()) 

data Notification Source

Representation of a notification sent by PostgreSQL.

Constructors

Notification 

Fields

ntPID :: !CPid

Process ID of notifying server.

ntChannel :: !Channel

Notification channel name.

ntPayload :: !ByteString

Notification payload string.

listen :: MonadDB m => Channel -> m () Source

Start listening for notifications on a given channel.

unlisten :: MonadDB m => Channel -> m () Source

Stop listening for notifications on a given channel.

unlistenAll :: MonadDB m => m () Source

Cancel all listener registrations for the current session.

notify :: MonadDB m => Channel -> ByteString -> m () Source

Generate a notification on a given channel.