Copyright | (c) 2019 Florian Grignon |
---|---|
License | BSD3 |
Maintainer | grignon.florian@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This library provide a Simple and Extensible access to PostgreSQL.
Simple: Poseidon runs a SQL query and returns a set of custom datatype. **It is not an ORM.**
Extensible: As a user of the library, you can map your custom PostgreSQL type to your Haskell datatype easily, in a pluggable way (e.g. if you're using postgis, you will be most likely interested by poseidon-postgis, that maps GeoJSON WKT to GeospatialGeometry).
Documentation
newtype ExceptionText Source #
Instances
Eq ExceptionText Source # | |
Defined in Database.Poseidon (==) :: ExceptionText -> ExceptionText -> Bool # (/=) :: ExceptionText -> ExceptionText -> Bool # | |
Show ExceptionText Source # | |
Defined in Database.Poseidon showsPrec :: Int -> ExceptionText -> ShowS # show :: ExceptionText -> String # showList :: [ExceptionText] -> ShowS # | |
Exception ExceptionText Source # | |
Defined in Database.Poseidon |
data ExceptionPostgreSQL Source #
Instances
Eq ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon (==) :: ExceptionPostgreSQL -> ExceptionPostgreSQL -> Bool # (/=) :: ExceptionPostgreSQL -> ExceptionPostgreSQL -> Bool # | |
Show ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon showsPrec :: Int -> ExceptionPostgreSQL -> ShowS # show :: ExceptionPostgreSQL -> String # showList :: [ExceptionPostgreSQL] -> ShowS # | |
Exception ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon |
queryFromText :: (HasEot a, EotDeserialize (Eot a)) => Connection -> Text -> [Maybe (Oid, ByteString, Format)] -> IO [a] Source #
class EotDeserialize eot where Source #
Instances
EotDeserialize () Source # | |
Defined in Database.Poseidon | |
EotDeserialize Void Source # | |
Defined in Database.Poseidon | |
(EotDeserialize this, EotDeserialize next) => EotDeserialize (Either this next) Source # | |
Defined in Database.Poseidon | |
(Deserialize x, EotDeserialize xs) => EotDeserialize (x, xs) Source # | |
Defined in Database.Poseidon |
getBSValue :: Result -> CInt -> CInt -> IO (Maybe ByteString) Source #
class Deserialize a where Source #
Instances
Deserialize Bool Source # | |
Defined in Database.Poseidon | |
Deserialize Double Source # | |
Defined in Database.Poseidon | |
Deserialize Float Source # | |
Defined in Database.Poseidon | |
Deserialize Integer Source # | |
Defined in Database.Poseidon | |
Deserialize () Source # | |
Defined in Database.Poseidon | |
Deserialize ByteString Source # | |
Defined in Database.Poseidon deserialize :: Result -> CInt -> CInt -> IO ByteString Source # | |
Deserialize ByteString Source # | |
Defined in Database.Poseidon deserialize :: Result -> CInt -> CInt -> IO ByteString Source # | |
Deserialize Text Source # | |
Defined in Database.Poseidon | |
Deserialize UTCTime Source # | |
Defined in Database.Poseidon | |
Deserialize Value Source # | |
Defined in Database.Poseidon | |
Deserialize UUID Source # | |
Defined in Database.Poseidon | |
Deserialize [Text] Source # | |
Defined in Database.Poseidon | |
Deserialize (Maybe Bool) Source # | |
Defined in Database.Poseidon | |
Deserialize (Maybe Text) Source # | |
Defined in Database.Poseidon |
genericDeserialize :: (HasEot a, EotDeserialize (Eot a)) => Result -> CInt -> CInt -> IO a Source #