Idris2Doc : Postgres.DB.Core

Postgres.DB.Core

(source)

Definitions

pgOpen : HasIOio=>String->ioConn
  Open a connection to a Postgres database.
This connection must be closed using `pgClose`.

You can check the status of the connection
(including failure to connect) with the
`pgStatus` function.

Visibility: export
pgClose : HasIOio=>Conn->io ()
  Close a connection to a Postgres database.

Visibility: export
pgStatus : Conn->ConnectionStatus
  Get the status of a Postgres database connection.

Visibility: export
pgErrorMessage : HasIOio=>Conn->ioString
  Get an error message from Postgres when something goes wrong.

Visibility: export
pgConsumeInput : Conn->IOBool
  Consume any input the server has delivered
since the last time we ran a command that
otherwise consumed server input.

It can be useful to explicitly call upon
`libpq` to consume input when doing something
like listening for notifications that does
not otherwise require making any calls to
execute anything on the server.

Returns True if successfuly and False
otherwise.

Visibility: export