 | hvac-0.1: Http view and controller. A transactional, declarative framework for lightweight web applications. | Contents | Index |
|
|
|
|
|
| Documentation |
|
| newtype IntEx |
| Constructors | | Instances | |
|
|
| class OneVal a b | a -> b where |
| | Methods | | | Instances | |
|
|
| data Key a b |
| Constructors | | Key [String] a -> [SqlValue] | |
|
|
|
| takeOne :: MonadState [a] m => m a |
|
| sqlNull :: SqlValue -> Bool |
|
| geq' :: GenericQ (GenericQ (Maybe SqlValue)) |
|
| gToSql :: Data d => d -> SqlValue |
|
| getNameFromAccessor :: forall a a' b. StaticRecord a a' => (a -> b) -> String |
|
| class (Monad m, IConnection c) => MonadDB m c | m -> c where |
| | Methods | | getConn :: m c | | | liftDB :: IO a -> m a |
| | Instances | |
|
|
| class Data a => StaticRecord a b | a -> b where |
| | Methods | | tableName :: a -> String | | | primaryKey :: Key a b | | | _srFields :: a -> [String] | | For internal use. List of names of columns, in order of constructors.
Can be overridden to provide other names.
|
| | Instances | |
|
|
| class StaticRecord a a' => Has a b a' | a -> a' where |
| | Methods | | | Instances | |
|
|
| gbuild :: StaticRecord a a' => a -> [SqlValue] -> a |
|
| gfindnewvals :: (Data a, StaticRecord a a') => a -> a -> [(String, SqlValue)] |
|
| getRecsWhere' :: forall m r r' c. (MonadDB m c, StaticRecord r r') => String -> [String] -> [SqlValue] -> m [r] |
|
| runConnT :: (IConnection c, MonadIO m) => IO c -> ReaderT c m () -> m () |
|
| runConn :: IConnection c => IO c -> ReaderT c IO () -> IO () |
|
| mkKey :: (StaticRecord r r', MapFromTuple a (r -> SqlValue), MapFromTuple a String, TupleMatch a b) => a -> Key r b |
|
| mkForeign :: (r -> a) -> b -> r -> (Box a) |
|
| getRec :: forall m r c a. (Functor m, MonadDB m c, StaticRecord r a, MapFromTuple a SqlValue) => a -> m (Maybe r) |
|
| getRecsWhere :: (MonadDB m c, StaticRecord r r') => WhereExpr Bool cl -> m [r] |
|
| insertRec :: (MonadDB m c, StaticRecord r r') => r -> m () |
|
| updateRec :: forall r r' m c. (MonadDB m c, StaticRecord r r') => (r -> r) -> r -> m r |
|
| updateWhere :: (StaticRecord r r', MonadDB m c) => (r -> r) -> WhereExpr Bool cl -> m () |
|
| getAssociated :: forall a b a' b' a'' m c. (MonadDB m c, Has a b a', StaticRecord b b', OneVal a' a'') => a -> m [b] |
|
| getParent :: forall a b a' b' a'' m c. (MonadDB m c, Functor m, Has a b a', StaticRecord a a', StaticRecord b b', OneVal a' a'', SqlType a'') => b -> m (Maybe a) |
|
| newtype DbTName |
|
|
| data CWhere |
Instances | |
|
|
| data COrder |
Instances | |
|
|
| data CLimit |
|
| class WhereOrOrder a |
| Instances | |
|
|
| data SqlOrder |
|
|
| data SelClause a |
| Constructors | | SelClause String [String] | |
| Instances | |
|
|
| data WhereExpr t c |
| Constructors | | WhereExpr String [String] [SqlValue] | |
| Instances | |
|
|
| data SelWhere a |
| Constructors | | SelWhere String [SqlValue] | |
| Instances | |
|
|
| class ToExpr a t | a -> t where |
| | Methods | | | Instances | |
|
|
| stToExpr :: SqlType a => a -> WhereExpr a CWhere |
|
| getTuples :: (MapToTuple t SqlValue, MonadDB m c) => SelWhere t -> m [t] |
|
| select :: (MapFromTuple a String, MapFromTuple a DbTName, TupleMatch a b) => a -> SelClause b |
|
| whre :: SelClause a -> WhereExpr Bool c -> SelWhere a |
|
| orderBy :: (MapFromTuple a ([Char], SqlOrder), MapFromTuple a DbTName) => WhereExpr Bool CWhere -> a -> WhereExpr Bool COrder |
|
| limit :: WhereOrOrder c => WhereExpr Bool c -> Integer -> WhereExpr Bool CLimit |
|
| biOp :: (ToExpr a t, ToExpr b t') => [Char] -> a -> b -> WhereExpr c CWhere |
|
| (%=) :: (ToExpr a t, ToExpr b t) => a -> b -> WhereExpr Bool CWhere |
|
| (%!=) :: (ToExpr a t, ToExpr b t) => a -> b -> WhereExpr Bool CWhere |
|
| (%<) :: (ToExpr a t, ToExpr b t, Ord t) => a -> b -> WhereExpr Bool CWhere |
|
| (%>) :: (ToExpr a t, ToExpr b t, Ord t) => a -> b -> WhereExpr Bool CWhere |
|
| (%*) :: (ToExpr a t, ToExpr b t, Num t) => a -> b -> WhereExpr t CWhere |
|
| (%/) :: (ToExpr a t, ToExpr b t, Num t) => a -> b -> WhereExpr t CWhere |
|
| (%-) :: (ToExpr a t, ToExpr b t, Num t) => a -> b -> WhereExpr t CWhere |
|
| (%+) :: (ToExpr a t, ToExpr b t, Num t) => a -> b -> WhereExpr t CWhere |
|
| (%%) :: (ToExpr a t, ToExpr b t, Integral t) => a -> b -> WhereExpr t CWhere |
|
| (%&) :: (ToExpr a Bool, ToExpr b Bool) => a -> b -> WhereExpr Bool CWhere |
|
| (%|) :: (ToExpr a Bool, ToExpr b Bool) => a -> b -> WhereExpr Bool CWhere |
|
| (%++) :: (ToExpr a Bool, ToExpr b Bool) => a -> b -> WhereExpr Bool CWhere |
|
| like :: (ToExpr a [Char], ToExpr b [Char]) => a -> b -> WhereExpr Bool CWhere |
|
| isIn :: (ToExpr a t, ToExpr b t) => a -> [b] -> WhereExpr Bool CWhere |
|
| isNull :: ToExpr a (Maybe t) => a -> WhereExpr Bool CWhere |
|
| notNull :: ToExpr a (Maybe t) => a -> WhereExpr Bool CWhere |
|
| data Post |
| Constructors | | Post | | | pid :: Int | | | contents :: String | | | authorId :: Int | |
|
| Instances | |
|
|
| data Author |
| Constructors | | Author | | | aid :: Int | | | aname :: String | |
|
| Instances | |
|
|
| Produced by Haddock version 2.0.0.0 |