Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Table writerColumns viewColumns = Table String (TableProperties writerColumns viewColumns)
- data TableProperties writerColumns viewColumns = TableProperties (Writer writerColumns viewColumns) (View viewColumns)
- data View columns = View columns
- newtype Writer columns dummy = Writer (forall f. Functor f => PackMap (f PrimExpr, String) () (f columns) ())
- queryTable :: ColumnMaker viewColumns columns -> Table writerColumns viewColumns -> Tag -> (columns, PrimQuery)
- runColumnMaker :: ColumnMaker tablecolumns columns -> Tag -> tablecolumns -> (columns, [(Symbol, PrimExpr)])
- runWriter :: Writer columns columns' -> columns -> [(PrimExpr, String)]
- runWriter' :: Writer columns columns' -> NonEmpty columns -> (NonEmpty [PrimExpr], [String])
- data Zip a = Zip {}
- required :: String -> Writer (Column a) (Column a)
- optional :: String -> Writer (Maybe (Column a)) (Column a)
Documentation
"pWidget" ''Widget)
widgetTable :: Table (Widget (Maybe (Column PGInt4)) (Column PGText) (Column PGText) (Column PGInt4) (Column PGFloat8)) (Widget (Column PGText) (Column PGText) (Column PGText) (Column PGInt4) (Column PGFloat8)) widgetTable = Table "widgetTable" (pWidget Widget { wid = optional "id" , color = required "color" , location = required "location" , quantity = required "quantity" , radius = required "radius" }) @
data Table writerColumns viewColumns Source #
Table String (TableProperties writerColumns viewColumns) |
data TableProperties writerColumns viewColumns Source #
TableProperties (Writer writerColumns viewColumns) (View viewColumns) |
Instances
newtype Writer columns dummy Source #
Instances
Profunctor Writer Source # | |
Defined in Opaleye.SQLite.Internal.Table dimap :: (a -> b) -> (c -> d) -> Writer b c -> Writer a d # lmap :: (a -> b) -> Writer b c -> Writer a c # rmap :: (b -> c) -> Writer a b -> Writer a c # (#.) :: forall a b c q. Coercible c b => q b c -> Writer a b -> Writer a c # (.#) :: forall a b c q. Coercible b a => Writer b c -> q a b -> Writer a c # | |
ProductProfunctor Writer Source # | |
Functor (Writer a) Source # | |
Applicative (Writer a) Source # | |
queryTable :: ColumnMaker viewColumns columns -> Table writerColumns viewColumns -> Tag -> (columns, PrimQuery) Source #
runColumnMaker :: ColumnMaker tablecolumns columns -> Tag -> tablecolumns -> (columns, [(Symbol, PrimExpr)]) Source #
runWriter' :: Writer columns columns' -> NonEmpty columns -> (NonEmpty [PrimExpr], [String]) Source #