Idris2Doc : Postgres.DB.Core

Postgres.DB.Core

(source)

Definitions

pgOpen : HasIO io => String -> io Conn
  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 : HasIO io => 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 : HasIO io => Conn -> io String
  Get an error message from Postgres when something goes wrong.

Visibility: export
pgConsumeInput : Conn -> IO Bool
  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