Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Connection :: *
- data ConnectInfo = ConnectInfo {
- ciHostname :: String
- ciPort :: Word16
- ciUsername :: String
- ciPassword :: String
- ciDatabase :: String
- connect :: ConnectInfo -> IO Connection
- connectString :: ByteString -> IO Connection
- disconnect :: Connection -> IO ()
- type Request = Request PSQL
- type RequestT = RequestT PSQL
- runRequest :: (HasConnection m, MonadIO m) => PSQL -> Request a -> m (Either SeakaleError a)
- runRequestT :: (HasConnection m, MonadIO m) => PSQL -> RequestT m a -> m (Either SeakaleError a)
- type Select = Select PSQL
- type SelectT = SelectT PSQL
- runSelect :: Select a -> Request a
- runSelectT :: Monad m => SelectT m a -> RequestT m a
- type Store = Store PSQL
- type StoreT m = StoreT PSQL m
- runStore :: Store a -> Request a
- runStoreT :: Monad m => StoreT m a -> RequestT m a
- class Monad m => HasConnection m where
- data PSQL = PSQL {}
- defaultPSQL :: PSQL
- data SeakaleError :: *
- data Query a :: Nat -> * where
- newtype Field backend :: * -> * = Field {}
- type Row backend = [Field backend]
- data ColumnInfo backend :: * -> * = ColumnInfo {
- colInfoName :: Maybe ByteString
- colInfoType :: ColumnType backend
- type QueryData n = Vector n ByteString
- data Vector a b :: Nat -> * -> * where
- cons :: a -> Vector n a -> Vector (S n) a
- (<:>) :: a -> Vector n a -> Vector (S n) a
- nil :: Vector Zero a
- (<:|) :: a -> a -> Vector Two a
- type Zero = O
- type One = S Zero
- type Two = S One
- type Three = S Two
- type Four = S Three
- type Five = S Four
- type Six = S Five
- type Seven = S Six
- type Eight = S Seven
- type Nine = S Eight
- type Ten = S Nine
Documentation
data Connection :: * #
Connection
encapsulates a connection to the backend.
Eq Connection | |
Monad m => HasConnection (ReaderT * Connection m) Source # | |
data ConnectInfo Source #
ConnectInfo | |
|
connect :: ConnectInfo -> IO Connection Source #
connectString :: ByteString -> IO Connection Source #
disconnect :: Connection -> IO () Source #
runRequest :: (HasConnection m, MonadIO m) => PSQL -> Request a -> m (Either SeakaleError a) Source #
runRequestT :: (HasConnection m, MonadIO m) => PSQL -> RequestT m a -> m (Either SeakaleError a) Source #
class Monad m => HasConnection m where Source #
withConn :: (Connection -> m a) -> m a Source #
HasConnection m => HasConnection (ExceptT e m) Source # | |
HasConnection m => HasConnection (StateT s m) Source # | |
Monad m => HasConnection (ReaderT * Connection m) Source # | |
defaultPSQL :: PSQL Source #
data SeakaleError :: * #
data ColumnInfo backend :: * -> * #
ColumnInfo | |
|
Eq (ColumnType backend) => Eq (ColumnInfo backend) | |
Show (ColumnType backend) => Show (ColumnInfo backend) | |
type QueryData n = Vector n ByteString #
data Vector a b :: Nat -> * -> * where #
FromRow backend Zero (Vector Zero a) | |
(FromRow backend One a, FromRow backend n (Vector n a)) => FromRow backend (S n) (Vector (S n) a) | |
Functor (Vector n) | |
NTimes (Vector n) => NTimes (Vector (S n)) | |
NTimes (Vector Zero) | |
(IsList (Vector n a), (~) * (Item (Vector n a)) a) => IsList (Vector (S n) a) | |
IsList (Vector Zero a) | |
Eq a => Eq (Vector n a) | |
type Item (Vector (S n) a) | |
type Item (Vector Zero a) | |