Copyright | © 2019 Shirren Premaratne |
---|---|
License | MIT |
Maintainer | Shirren Premaratne <shirren.premaratne@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Functions to generate Postgres data via the postgres-simple library.
Documentation
build :: ToRow q => Connection -> ParentTable -> [q] -> IO [Id] Source #
build1 :: ToRow q => Connection -> ParentTable -> q -> IO (Maybe Id) Source #
buildWith1Rel :: ToRow q => Connection -> ParentTable -> ChildTable -> [q] -> IO [Id] Source #
build1With1Rel :: ToRow q => Connection -> ParentTable -> ChildTable -> q -> IO (Maybe Id) Source #
buildWithManyRels :: ToRow q => Connection -> [ParentTable] -> ChildTable -> [q] -> IO [Id] Source #
build1WithManyRels :: ToRow q => Connection -> [ParentTable] -> ChildTable -> q -> IO (Maybe Id) Source #
deleteStatement :: Table -> Query Source #
insertStatement :: ParentTable -> Query Source #
insertStatementWith1Rel :: ParentTable -> ChildTable -> Query Source #
insertStatementWithManyRels :: [ParentTable] -> ChildTable -> Query Source #
mapFromIdToResult :: ParentTable -> [Id] -> [Result] Source #