Safe Haskell | None |
---|---|
Language | Haskell98 |
- runInsert :: Connection -> Table columns columns' -> columns -> IO Int64
- runInsertMany :: Connection -> Table columns columns' -> [columns] -> IO Int64
- runInsertReturning :: Default QueryRunner returned haskells => Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> IO [haskells]
- runUpdate :: Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> IO Int64
- runUpdateReturning :: Default QueryRunner returned haskells => Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> IO [haskells]
- runDelete :: Connection -> Table a columnsR -> (columnsR -> Column PGBool) -> IO Int64
- runInsertReturningExplicit :: QueryRunner returned haskells -> Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> IO [haskells]
- runUpdateReturningExplicit :: QueryRunner returned haskells -> Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> IO [haskells]
- arrangeInsert :: Table columns a -> columns -> SqlInsert
- arrangeInsertSql :: Table columns a -> columns -> String
- arrangeInsertMany :: Table columns a -> NonEmpty columns -> SqlInsert
- arrangeInsertManySql :: Table columns a -> NonEmpty columns -> String
- arrangeUpdate :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> SqlUpdate
- arrangeUpdateSql :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> String
- arrangeDelete :: Table a columnsR -> (columnsR -> Column PGBool) -> SqlDelete
- arrangeDeleteSql :: Table a columnsR -> (columnsR -> Column PGBool) -> String
- arrangeInsertReturning :: Unpackspec returned ignored -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> Returning SqlInsert
- arrangeInsertReturningSql :: Unpackspec returned ignored -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> String
- arrangeUpdateReturning :: Unpackspec returned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> Returning SqlUpdate
- arrangeUpdateReturningSql :: Unpackspec returned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> String
- data Unpackspec columns columns'
Documentation
runInsertMany :: Connection -> Table columns columns' -> [columns] -> IO Int64 Source
runInsertReturning :: Default QueryRunner returned haskells => Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> IO [haskells] Source
runInsertReturning
's use of the Default
typeclass means that the
compiler will have trouble inferring types. It is strongly
recommended that you provide full type signatures when using
runInsertReturning
.
runUpdate :: Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> IO Int64 Source
Where the predicate is true, update rows using the supplied function.
runUpdateReturning :: Default QueryRunner returned haskells => Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> IO [haskells] Source
runUpdateReturning
's use of the Default
typeclass means
that the compiler will have trouble inferring types. It is
strongly recommended that you provide full type signatures when
using runInsertReturning
.
runDelete :: Connection -> Table a columnsR -> (columnsR -> Column PGBool) -> IO Int64 Source
Delete rows where the predicate is true.
runInsertReturningExplicit :: QueryRunner returned haskells -> Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> IO [haskells] Source
You probably don't need this, but can just use
runInsertReturning
instead. You only need it if you want to run
an UPDATE RETURNING statement but need to be explicit about the
QueryRunner
.
runUpdateReturningExplicit :: QueryRunner returned haskells -> Connection -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> IO [haskells] Source
You probably don't need this, but can just use
runUpdateReturning
instead. You only need it if you want to run
an UPDATE RETURNING statement but need to be explicit about the
QueryRunner
.
arrangeInsert :: Table columns a -> columns -> SqlInsert Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeInsertSql :: Table columns a -> columns -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeInsertMany :: Table columns a -> NonEmpty columns -> SqlInsert Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeInsertManySql :: Table columns a -> NonEmpty columns -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeUpdate :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> SqlUpdate Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeUpdateSql :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeDelete :: Table a columnsR -> (columnsR -> Column PGBool) -> SqlDelete Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeDeleteSql :: Table a columnsR -> (columnsR -> Column PGBool) -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeInsertReturning :: Unpackspec returned ignored -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> Returning SqlInsert Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeInsertReturningSql :: Unpackspec returned ignored -> Table columnsW columnsR -> columnsW -> (columnsR -> returned) -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeUpdateReturning :: Unpackspec returned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> Returning SqlUpdate Source
For internal use only. Do not use. Will be removed in a subsequent release.
arrangeUpdateReturningSql :: Unpackspec returned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column PGBool) -> (columnsR -> returned) -> String Source
For internal use only. Do not use. Will be removed in a subsequent release.
data Unpackspec columns columns' Source