Idris2Doc : Postgres.Notification

Postgres.Notification

(source)

Definitions

recordNotification : Type
Totality: total
Visibility: public export
Constructor: 
MkNotification : String->String->Notification

Projections:
.channel : Notification->String
.payload : Notification->String
.channel : Notification->String
Visibility: public export
channel : Notification->String
Visibility: public export
.payload : Notification->String
Visibility: public export
payload : Notification->String
Visibility: public export
pgListen : String->Conn->IOResultStatus
  Start listening for notifications on the given channel.

Visibility: export
pgNextNotification : Conn->IO (MaybeNotification)
  Gets the next notification _of those sitting around locally_.
Returns `Nothing` if there are no notifications.

See `libpq` documentation on `PQnotifies` for details on the
distinction between retrieving notifications from the server and
getting the next notification that has already been retrieved.

NOTE: This function _does_ consume input to make sure no notification
sent by the server but not processed by the client yet gets
missed.

Visibility: export
pgNotificationStream : Conn->Stream (IONotification)
  Produce a potentially infinite stream of notifications.
Unlike `pgNextNotificaiton`, this will wait for the server
to deliver a notification.

This _is_ an infinite sequence with a blocking wait for the
next notification so it is of somewhat limited utility
compared to checking for new notifications at a natural point
in your programs existing logic loop unless your entire loop
is dictated by notification arrival anyway.

Visibility: export