| Copyright | (c) 2019 Florian Grignon |
|---|---|
| License | BSD3 |
| Maintainer | grignon.florian@gmail.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.Poseidon
Description
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 #
Constructors
| ExceptionText Text |
Instances
| Eq ExceptionText Source # | |
Defined in Database.Poseidon Methods (==) :: ExceptionText -> ExceptionText -> Bool # (/=) :: ExceptionText -> ExceptionText -> Bool # | |
| Show ExceptionText Source # | |
Defined in Database.Poseidon Methods showsPrec :: Int -> ExceptionText -> ShowS # show :: ExceptionText -> String # showList :: [ExceptionText] -> ShowS # | |
| Exception ExceptionText Source # | |
Defined in Database.Poseidon Methods toException :: ExceptionText -> SomeException # fromException :: SomeException -> Maybe ExceptionText # displayException :: ExceptionText -> String # | |
data ExceptionPostgreSQL Source #
Constructors
| ExceptionPGUniqueViolation | |
| ExceptionPGJWTMalformed | |
| ExceptionPGJWTInvalid | |
| ExceptionPGUnknown |
Instances
| Eq ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon Methods (==) :: ExceptionPostgreSQL -> ExceptionPostgreSQL -> Bool # (/=) :: ExceptionPostgreSQL -> ExceptionPostgreSQL -> Bool # | |
| Show ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon Methods showsPrec :: Int -> ExceptionPostgreSQL -> ShowS # show :: ExceptionPostgreSQL -> String # showList :: [ExceptionPostgreSQL] -> ShowS # | |
| Exception ExceptionPostgreSQL Source # | |
Defined in Database.Poseidon Methods toException :: ExceptionPostgreSQL -> SomeException # fromException :: SomeException -> Maybe ExceptionPostgreSQL # | |
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 Methods deserialize :: Result -> CInt -> CInt -> IO ByteString Source # | |
| Deserialize ByteString Source # | |
Defined in Database.Poseidon Methods 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 #