Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Returning a b where
- Count :: Returning a Int64
- ReturningExplicit :: FromFields b c -> (a -> b) -> Returning a [c]
- arrangeInsertMany :: Table columns a -> NonEmpty columns -> Maybe OnConflict -> SqlInsert
- arrangeInsertManyReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Maybe OnConflict -> Returning SqlInsert
- arrangeInsertManyReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Maybe OnConflict -> String
- arrangeInsertManySql :: Table columnsW columnsR -> NonEmpty columnsW -> Maybe OnConflict -> String
- runInsertManyReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> [columnsW] -> (columnsR -> columnsReturned) -> Maybe OnConflict -> IO [haskells]
- newtype Updater a b = Updater (a -> b)
- arrangeDeleteReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Returning SqlDelete
- arrangeDeleteReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> String
- runDeleteReturning :: Default FromFields columnsReturned haskells => Connection -> Table a columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> IO [haskells]
- runDeleteReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table a columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> IO [haskells]
- arrangeDelete :: Table a columnsR -> (columnsR -> Column SqlBool) -> SqlDelete
- runInsert :: Connection -> Table fields fields' -> fields -> IO Int64
- runInsertReturning :: Default FromFields fieldsReturned haskells => Connection -> Table fieldsW fieldsR -> fieldsW -> (fieldsR -> fieldsReturned) -> IO [haskells]
- runInsertReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> columnsReturned) -> IO [haskells]
- runInsertManyReturningExplicitI :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> [columnsW] -> (columnsR -> columnsReturned) -> IO [haskells]
- arrangeInsert :: Table columns a -> columns -> SqlInsert
- arrangeInsertSql :: Table columns a -> columns -> String
- arrangeInsertManyI :: Table columns a -> NonEmpty columns -> SqlInsert
- arrangeInsertManySqlI :: Table columns a -> NonEmpty columns -> String
- arrangeUpdate :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> SqlUpdate
- arrangeUpdateSql :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> String
- arrangeDeleteSql :: Table a columnsR -> (columnsR -> Column SqlBool) -> String
- arrangeInsertManyReturningI :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Returning SqlInsert
- arrangeInsertManyReturningSqlI :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> String
- arrangeUpdateReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Returning SqlUpdate
- arrangeUpdateReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> String
Documentation
data Returning a b where Source #
Don't use this internal datatype. Instead you probably want
rCount
or rReturning
.
Count :: Returning a Int64 | |
ReturningExplicit :: FromFields b c -> (a -> b) -> Returning a [c] |
arrangeInsertMany :: Table columns a -> NonEmpty columns -> Maybe OnConflict -> SqlInsert Source #
arrangeInsertManyReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Maybe OnConflict -> Returning SqlInsert Source #
arrangeInsertManyReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Maybe OnConflict -> String Source #
arrangeInsertManySql :: Table columnsW columnsR -> NonEmpty columnsW -> Maybe OnConflict -> String Source #
runInsertManyReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> [columnsW] -> (columnsR -> columnsReturned) -> Maybe OnConflict -> IO [haskells] Source #
Updater (a -> b) |
Instances
Profunctor Updater Source # | |
Defined in Opaleye.Internal.Manipulation dimap :: (a -> b) -> (c -> d) -> Updater b c -> Updater a d # lmap :: (a -> b) -> Updater b c -> Updater a c # rmap :: (b -> c) -> Updater a b -> Updater a c # (#.) :: forall a b c q. Coercible c b => q b c -> Updater a b -> Updater a c # (.#) :: forall a b c q. Coercible b a => Updater b c -> q a b -> Updater a c # | |
ProductProfunctor Updater Source # | |
Default Updater (Column a) (Maybe (Column a)) Source # | |
Default Updater (Column a) (Column a) Source # | |
Functor (Updater a) Source # | |
Applicative (Updater a) Source # | |
Defined in Opaleye.Internal.Manipulation |
arrangeDeleteReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Returning SqlDelete Source #
arrangeDeleteReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> String Source #
:: Default FromFields columnsReturned haskells | |
=> Connection | |
-> Table a columnsR | Table to delete rows from |
-> (columnsR -> Column SqlBool) | Predicate function |
-> (columnsR -> columnsReturned) | |
-> IO [haskells] | Returned rows which have been deleted |
runDeleteReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table a columnsR -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> IO [haskells] Source #
runInsertReturning :: Default FromFields fieldsReturned haskells => Connection -> Table fieldsW fieldsR -> fieldsW -> (fieldsR -> fieldsReturned) -> IO [haskells] Source #
runInsertReturningExplicit :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> columnsW -> (columnsR -> columnsReturned) -> IO [haskells] Source #
runInsertManyReturningExplicitI :: FromFields columnsReturned haskells -> Connection -> Table columnsW columnsR -> [columnsW] -> (columnsR -> columnsReturned) -> IO [haskells] Source #
arrangeInsert :: Table columns a -> columns -> SqlInsert Source #
arrangeInsertSql :: Table columns a -> columns -> String Source #
arrangeUpdate :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> SqlUpdate Source #
arrangeUpdateSql :: Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> String Source #
arrangeInsertManyReturningI :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> Returning SqlInsert Source #
arrangeInsertManyReturningSqlI :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> NonEmpty columnsW -> (columnsR -> columnsReturned) -> String Source #
arrangeUpdateReturning :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> Returning SqlUpdate Source #
arrangeUpdateReturningSql :: Unpackspec columnsReturned ignored -> Table columnsW columnsR -> (columnsR -> columnsW) -> (columnsR -> Column SqlBool) -> (columnsR -> columnsReturned) -> String Source #