pg-store-0.0.1: Dead simple storage interface to PostgreSQL

Copyright(c) Ole Krüger 2015-2016
LicenseBSD3
MaintainerOle Krüger <ole@vprsm.de>
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Store.Errand

Description

 

Synopsis

Documentation

type Errand = ReaderT Connection (ExceptT ErrandError IO) Source

An interaction with the database

runErrand :: Connection -> Errand a -> IO (Either ErrandError a) Source

Run an errand.

raiseErrandError :: ErrandError -> Errand a Source

Raise an error.

executeQuery :: Query -> Errand Result Source

Execute a query and return its result.

query :: Result a => Query -> Errand [a] Source

Execute a query and process its result set. It is essential that all fields required by the underlying result parser are present.

query_ :: Query -> Errand () Source

Execute a query.