-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Meta package of Relational Record
--   
--   Meta package to install Relational Record quickly
@package relational-record
@version 0.2.2.0


-- | This module is documentation module for relational-record. The project
--   page of relational-record is
--   <a>http://khibino.github.io/haskell-relational-record/</a> .
module Database.Relational.Documentation

-- | Join sub-query. Query result is not <a>Maybe</a>.
query :: (MonadQualify ConfigureQuery m, MonadQuery m) => Relation () r -> m (Record Flat r)

-- | Join sub-query. Query result is <a>Maybe</a>. The combinations of
--   <a>query</a> and <a>queryMaybe</a> express inner joins, left outer
--   joins, right outer joins, and full outer joins. Here is an example of
--   a right outer join:
--   
--   <pre>
--   outerJoin = relation $ do
--     e &lt;- queryMaybe employee
--     d &lt;- query department
--     on $ e ?! E.deptId' .=. just (d ! D.deptId')
--     return $ (,) |$| e |*| d
--   </pre>
queryMaybe :: (MonadQualify ConfigureQuery m, MonadQuery m) => Relation () r -> m (Record Flat (Maybe r))

-- | Add restriction to last join. Record type version.
on :: MonadQuery m => Predicate Flat -> m ()

-- | Add restriction to this not aggregated query.
wheres :: MonadRestrict Flat m => Predicate Flat -> m ()

-- | Add <i>GROUP BY</i> term into context and get aggregated record.
groupBy :: MonadAggregate m => Record Flat r -> m (Record Aggregated r)

-- | Add restriction to this aggregated query. Aggregated Record type
--   version.
having :: MonadRestrict Aggregated m => Predicate Aggregated -> m ()

-- | Specify DISTINCT attribute to query context.
distinct :: MonadQuery m => m ()

-- | Specify ALL attribute to query context.
all' :: MonadQuery m => m ()

-- | Add and assginment.
(<-#) :: forall (m :: Type -> Type) r v. Monad m => AssignTarget r v -> Record Flat v -> Assignings r m ()
infix 4 <-#

-- | Direct inner join.
inner :: Relation () a -> Relation () b -> [JoinRestriction a b] -> Relation () (a, b)
infixl 8 `inner`

-- | Direct left outer join.
left :: Relation () a -> Relation () b -> [JoinRestriction a (Maybe b)] -> Relation () (a, Maybe b)
infixl 8 `left`

-- | Direct right outer join.
right :: Relation () a -> Relation () b -> [JoinRestriction (Maybe a) b] -> Relation () (Maybe a, b)
infixl 8 `right`

-- | Direct full outer join.
full :: Relation () a -> Relation () b -> [JoinRestriction (Maybe a) (Maybe b)] -> Relation () (Maybe a, Maybe b)
infixl 8 `full`

-- | Apply restriction for direct join style.
on' :: ([JoinRestriction a b] -> Relation pc (a, b)) -> [JoinRestriction a b] -> Relation pc (a, b)
infixl 8 `on'`

-- | Restriction predicate function type for direct style join operator,
--   used on predicates of direct join style as follows.
--   
--   <pre>
--   do xy &lt;- query $
--            relX <a>inner</a> relY <a>on</a>` [ x y -&gt; ... ] -- this lambda form has JoinRestriction type
--      ...
--   </pre>
type JoinRestriction a b = Record Flat a -> Record Flat b -> Predicate Flat

-- | Relation type with place-holder parameter <tt>p</tt> and query result
--   type <tt>r</tt>.
data Relation p r

-- | Finalize <a>QuerySimple</a> monad and generate <a>Relation</a>.
relation :: QuerySimple (Record Flat r) -> Relation () r

-- | Finalize <a>QueryAggregate</a> monad and geneate <a>Relation</a>.
aggregateRelation :: QueryAggregate (Record Aggregated r) -> Relation () r

-- | UpdateTarget type with place-holder parameter <tt>p</tt> and projected
--   record type <tt>r</tt>.
type UpdateTarget p r = Record Flat r -> Assign r PlaceHolders p

-- | Deprecated.
updateTarget :: (Record Flat r -> Assign r ()) -> UpdateTarget () r

-- | Restriction type with place-holder parameter <tt>p</tt> and projected
--   record type <tt>r</tt>.
type Restriction p r = Record Flat r -> Restrict PlaceHolders p

-- | Deprecated.
restriction :: (Record Flat r -> Restrict ()) -> Restriction () r

-- | Phantom typed record. Projected into Haskell record type <tt>t</tt>.
data Record c t

-- | Type tag for flat (not-aggregated) query
data Flat

-- | Type tag for aggregated query
data Aggregated

-- | Type tag for exists predicate
data Exists

-- | Type tag for window function building
data OverWindow

-- | Projection path from type <tt>r0</tt> into type <tt>r1</tt>. This type
--   also indicate key object which type is <tt>r1</tt> for record type
--   <tt>r0</tt>.
data Pi r0 r1

-- | Get narrower record along with projection path.
(!) :: PersistableWidth a => Record c a -> Pi a b -> Record c b
infixl 8 !

-- | Compose projection path.
(<.>) :: Pi a b -> Pi b c -> Pi a c
infixl 8 <.>

-- | Deprecated.
type ShowConstantTermsSQL = LiteralSQL

-- | Generate record with polymorphic type of SQL constant values from
--   Haskell value.
value :: (LiteralSQL t, OperatorContext c) => t -> Record c t

-- | RecordList with polymorphic type of SQL set value from Haskell list.
values :: (LiteralSQL t, OperatorContext c) => [t] -> RecordList (Record c) t

-- | Compare operator corresponding SQL <i>=</i> .
(.=.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .=.

-- | Compare operator corresponding SQL <i>&lt;</i> .
(.<.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .<.

-- | Compare operator corresponding SQL <i>&lt;=</i> .
(.<=.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .<=.

-- | Compare operator corresponding SQL <i>&gt;</i> .
(.>.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .>.

-- | Compare operator corresponding SQL <i>&gt;=</i> .
(.>=.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .>=.

-- | Compare operator corresponding SQL <i>&lt;&gt;</i> .
(.<>.) :: OperatorContext c => Record c ft -> Record c ft -> Record c (Maybe Bool)
infix 4 .<>.

-- | Logical operator corresponding SQL <i>AND</i> .
and' :: OperatorContext c => Record c (Maybe Bool) -> Record c (Maybe Bool) -> Record c (Maybe Bool)
infixr 3 `and'`

-- | Logical operator corresponding SQL <i>OR</i> .
or' :: OperatorContext c => Record c (Maybe Bool) -> Record c (Maybe Bool) -> Record c (Maybe Bool)
infixr 2 `or'`

-- | Binary operator corresponding SQL <i>IN</i> .
in' :: OperatorContext c => Record c t -> RecordList (Record c) t -> Record c (Maybe Bool)
infix 4 `in'`

-- | Concatinate operator corresponding SQL <i>||</i> .
(.||.) :: OperatorContext c => Record c a -> Record c a -> Record c a
infixl 5 .||.

-- | String-compare operator corresponding SQL <i>LIKE</i> .
like :: (OperatorContext c, IsString a, LiteralSQL a) => Record c a -> a -> Record c (Maybe Bool)
infix 4 `like`

-- | String-compare operator corresponding SQL <i>LIKE</i> .
like' :: (OperatorContext c, IsString a) => Record c a -> Record c a -> Record c (Maybe Bool)
infix 4 `like'`

-- | Number operator corresponding SQL <i>+</i> .
(.+.) :: (OperatorContext c, Num a) => Record c a -> Record c a -> Record c a
infixl 6 .+.

-- | Number operator corresponding SQL <i>-</i> .
(.-.) :: (OperatorContext c, Num a) => Record c a -> Record c a -> Record c a
infixl 6 .-.

-- | Number operator corresponding SQL <i>*</i> .
(.*.) :: (OperatorContext c, Num a) => Record c a -> Record c a -> Record c a
infixl 7 .*.

-- | Number operator corresponding SQL /// .
(./.) :: (OperatorContext c, Num a) => Record c a -> Record c a -> Record c a
infixl 7 ./.

-- | Operator corresponding SQL <i>IS NULL</i> , and extended against
--   record types.
isNothing :: (OperatorContext c, HasColumnConstraint NotNull r) => Record c (Maybe r) -> Predicate c

-- | Operator corresponding SQL <i>NOT (... IS NULL)</i> , and extended
--   against record type.
isJust :: (OperatorContext c, HasColumnConstraint NotNull r) => Record c (Maybe r) -> Predicate c

-- | Operator from maybe type using record extended <tt>isNull</tt>.
fromMaybe :: (OperatorContext c, HasColumnConstraint NotNull r) => Record c r -> Record c (Maybe r) -> Record c r

-- | Logical operator corresponding SQL <i>NOT</i> .
not' :: OperatorContext c => Record c (Maybe Bool) -> Record c (Maybe Bool)

-- | Logical operator corresponding SQL <i>EXISTS</i> .
exists :: OperatorContext c => RecordList (Record Exists) r -> Record c (Maybe Bool)

-- | Number negate uni-operator corresponding SQL <i>-</i>.
negate' :: (OperatorContext c, Num a) => Record c a -> Record c a

-- | Number fromIntegral uni-operator.
fromIntegral' :: (SqlContext c, Integral a, Num b) => Record c a -> Record c b

-- | Unsafely show number into string-like type in records.
showNum :: (SqlContext c, Num a, IsString b) => Record c a -> Record c b

-- | Same as <a>caseSearch</a>, but you can write like <a>list</a>
--   <a>casesOrElse</a> <a>clause</a>.
casesOrElse :: OperatorContext c => [(Predicate c, Record c a)] -> Record c a -> Record c a

-- | Simple case operator correnponding SQL simple <i>CASE</i>. Like,
--   <i>CASE x WHEN v THEN a WHEN w THEN b ... ELSE c END</i>
case' :: OperatorContext c => Record c a -> [(Record c a, Record c b)] -> Record c b -> Record c b

-- | Aggregation function COUNT.
count :: (Integral b, AggregatedContext ac, SqlContext ac) => Record Flat a -> Record ac b

-- | Aggregation function SUM.
sum' :: (Num a, AggregatedContext ac, SqlContext ac) => Record Flat a -> Record ac (Maybe a)

-- | Aggregation function AVG.
avg :: (Num a, Fractional b, AggregatedContext ac, SqlContext ac) => Record Flat a -> Record ac (Maybe b)

-- | Aggregation function MAX.
max' :: (Ord a, AggregatedContext ac, SqlContext ac) => Record Flat a -> Record ac (Maybe a)

-- | Aggregation function MIN.
min' :: (Ord a, AggregatedContext ac, SqlContext ac) => Record Flat a -> Record ac (Maybe a)

-- | Aggregation function EVERY.
every :: (AggregatedContext ac, SqlContext ac) => Predicate Flat -> Record ac (Maybe Bool)

-- | Aggregation function ANY.
any' :: (AggregatedContext ac, SqlContext ac) => Predicate Flat -> Record ac (Maybe Bool)

-- | Aggregation function SOME.
some' :: (AggregatedContext ac, SqlContext ac) => Predicate Flat -> Record ac (Maybe Bool)

-- | Operator to make record of window function result using built
--   <a>Window</a> monad.
over :: SqlContext c => Record OverWindow a -> Window c () -> Record c a
infix 8 `over`

-- | <i>RANK()</i> term.
rank :: Integral a => Record OverWindow a

-- | <i>DENSE_RANK()</i> term.
denseRank :: Integral a => Record OverWindow a

-- | <i>ROW_NUMBER()</i> term.
rowNumber :: Integral a => Record OverWindow a

-- | <i>PERCENT_RANK()</i> term.
percentRank :: Record OverWindow Double

-- | <i>CUME_DIST()</i> term.
cumeDist :: Record OverWindow Double

-- | Union of two relations.
union :: Relation () a -> Relation () a -> Relation () a
infixl 7 `union`

-- | Subtraction of two relations.
except :: Relation () a -> Relation () a -> Relation () a
infixl 7 `except`

-- | Intersection of two relations.
intersect :: Relation () a -> Relation () a -> Relation () a
infixl 8 `intersect`

-- | Cast record phantom type into <a>Maybe</a>.
just :: ProjectableMaybe p => p a -> p (Maybe a)

-- | Compose nested <a>Maybe</a> phantom type on record.
flattenMaybe :: ProjectableMaybe p => p (Maybe (Maybe a)) -> p (Maybe a)

-- | Get narrower record along with projection path <a>Maybe</a> phantom
--   functor is <a>map</a>-ed.
(?!) :: PersistableWidth a => Record c (Maybe a) -> Pi a b -> Record c (Maybe b)
infixl 8 ?!

-- | Get narrower record along with projection path and project into result
--   record type. Source record <a>Maybe</a> phantom functor and projection
--   path leaf <a>Maybe</a> functor are <tt>join</tt>-ed.
(?!?) :: PersistableWidth a => Record c (Maybe a) -> Pi a (Maybe b) -> Record c (Maybe b)
infixl 8 ?!?

-- | Compose projection path. <a>Maybe</a> phantom functor is
--   <a>map</a>-ed.
(<?.>) :: Pi a (Maybe b) -> Pi b c -> Pi a (Maybe c)
infixl 8 <?.>

-- | Compose projection path. <a>Maybe</a> phantom functors are
--   <tt>join</tt>-ed like <tt>&gt;=&gt;</tt>.
(<?.?>) :: Pi a (Maybe b) -> Pi b (Maybe c) -> Pi a (Maybe c)
infixl 8 <?.?>

-- | Number operator corresponding SQL <i>+</i> .
(?+?) :: (OperatorContext c, Num a) => Record c (Maybe a) -> Record c (Maybe a) -> Record c (Maybe a)
infixl 6 ?+?

-- | Number negate uni-operator corresponding SQL <i>-</i>.
negateMaybe :: (OperatorContext c, Num a) => Record c (Maybe a) -> Record c (Maybe a)

-- | Aggregation function SUM.
sumMaybe :: (Num a, AggregatedContext ac, SqlContext ac) => Record Flat (Maybe a) -> Record ac (Maybe a)

-- | Provide scoped placeholder and return its parameter object. Monadic
--   version.
placeholder :: (PersistableWidth t, SqlContext c, Monad m) => (Record c t -> m a) -> m (PlaceHolders t, a)

-- | Join sub-query with place-holder parameter <tt>p</tt>. query result is
--   not <a>Maybe</a>.
query' :: MonadQuery m => Relation p r -> m (PlaceHolders p, Record Flat r)

-- | Direct left outer join with place-holder parameters.
left' :: Relation pa a -> Relation pb b -> [JoinRestriction a (Maybe b)] -> Relation (pa, pb) (a, Maybe b)
infixl 8 `left'`

-- | Finalize <a>QuerySimple</a> monad and generate <a>Relation</a> with
--   place-holder parameter <tt>p</tt>.
relation' :: SimpleQuery p r -> Relation p r

-- | Deprecated.
updateTarget' :: (Record Flat r -> Assign r (PlaceHolders p)) -> UpdateTarget p r

-- | Deprecated.
restriction' :: (Record Flat r -> Restrict (PlaceHolders p)) -> Restriction p r

-- | Union of two relations with place-holder parameters.
union' :: Relation p a -> Relation q a -> Relation (p, q) a
infixl 7 `union'`

-- | Define product isomorphic inference rule to specify record constructor
class ProductConstructor c

-- | Restricted functor on products.
class ProductIsoFunctor (f :: Type -> Type)
(|$|) :: (ProductIsoFunctor f, ProductConstructor (a -> b)) => (a -> b) -> f a -> f b
infixl 4 |$|

-- | Restricted applicative functor on products.
class ProductIsoFunctor f => ProductIsoApplicative (f :: Type -> Type)
pureP :: (ProductIsoApplicative f, ProductConstructor a) => a -> f a
(|*|) :: ProductIsoApplicative f => f (a -> b) -> f a -> f b
infixl 4 |*|

-- | Binary operator the same as <a>projectZip</a>.
(><) :: ProductIsoApplicative p => p a -> p b -> p (a, b)
infixl 1 ><

-- | From <a>Relation</a> into typed <a>Query</a>.
relationalQuery :: Relation p r -> Query p r

-- | Make typed <a>Insert</a> from <a>Table</a> and columns selector
--   <a>Pi</a>.
typedInsert :: PersistableWidth r => Table r -> Pi r r' -> Insert r'

-- | Make typed <a>InsertQuery</a> from columns selector <a>Table</a>,
--   <a>Pi</a> and <a>Relation</a>.
typedInsertQuery :: Table r -> Pi r r' -> Relation p r' -> InsertQuery p

-- | Make typed <a>Update</a> using <a>defaultConfig</a>, <a>Table</a> and
--   <a>Assign</a> computation.
typedUpdate :: Table r -> (Record Flat r -> Assign r (PlaceHolders p)) -> Update p

-- | Make typed <a>Delete</a> from <a>Table</a> and <a>Restrict</a>
--   computation.
typedDelete :: Table r -> (Record Flat r -> Restrict (PlaceHolders p)) -> Delete p

-- | Make typed <a>KeyUpdate</a> from <a>Table</a> and key columns selector
--   <a>Pi</a>.
typedKeyUpdate :: Table a -> Pi a p -> KeyUpdate p a

-- | Table type inferred <a>Insert</a>.
derivedInsert :: (PersistableWidth r, TableDerivable r) => Pi r r' -> Insert r'

-- | Table type inferred <a>InsertQuery</a>.
derivedInsertQuery :: TableDerivable r => Pi r r' -> Relation p r' -> InsertQuery p

-- | Make typed <a>Update</a> from <a>defaultConfig</a>, derived table and
--   <a>Assign</a> computation.
derivedUpdate :: TableDerivable r => (Record Flat r -> Assign r (PlaceHolders p)) -> Update p

-- | Make typed <a>Delete</a> from <a>defaultConfig</a>, derived table and
--   <a>Restrict</a> computation.
derivedDelete :: TableDerivable r => (Record Flat r -> Restrict (PlaceHolders p)) -> Delete p

-- | <a>FromSql</a> <tt>q</tt> <tt>a</tt> is implicit rule to derive
--   <a>RecordFromSql</a> <tt>q</tt> <tt>a</tt> record parser function
--   against type <tt>a</tt>.
--   
--   Generic programming
--   (<a>https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming</a>)
--   with default signature is available for <a>FromSql</a> class, so you
--   can make instance like below:
--   
--   <pre>
--   {-# LANGUAGE DeriveGeneric #-}
--   import GHC.Generics (Generic)
--   import Database.HDBC (SqlValue)
--   --
--   data Foo = Foo { ... } deriving Generic
--   instance FromSql SqlValue Foo
--   </pre>
class FromSql q a

-- | <a>ToSql</a> <tt>q</tt> <tt>a</tt> is implicit rule to derive
--   <a>RecordToSql</a> <tt>q</tt> <tt>a</tt> record printer function for
--   type <tt>a</tt>.
--   
--   Generic programming
--   (<a>https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming</a>)
--   with default signature is available for <a>ToSql</a> class, so you can
--   make instance like below:
--   
--   <pre>
--   {-# LANGUAGE DeriveGeneric #-}
--   import GHC.Generics (Generic)
--   import Database.HDBC (SqlValue)
--   --
--   data Foo = Foo { ... } deriving Generic
--   instance ToSql SqlValue Foo
--   </pre>
--   
--   To make instances of <a>ToSql</a> manually, <a>ToSql</a> <tt>q</tt>
--   <tt>a</tt> and <a>RecordToSql</a> 'q <tt>a</tt> are composable with
--   monadic context. When, you have data constructor and objects like
--   below.
--   
--   <pre>
--   data MyRecord = MyRecord Foo Bar Baz
--   </pre>
--   
--   <pre>
--   instance ToSql SqlValue Foo where
--     ...
--   instance ToSql SqlValue Bar where
--     ...
--   instance ToSql SqlValue Baz where
--     ...
--   </pre>
--   
--   You can get composed <a>ToSql</a> implicit rule like below.
--   
--   <pre>
--   instance ToSql SqlValue MyRecord where
--     recordToSql =
--     recordToSql = wrapToSql $ \ (MyRecord x y z) -&gt; do
--       putRecord x
--       putRecord y
--       putRecord z
--   </pre>
class PersistableWidth a => ToSql q a

-- | <a>RecordFromSql</a> <tt>q</tt> <tt>a</tt> is data-type wrapping
--   function to convert from list of database value type (to receive from
--   database) [<tt>q</tt>] into Haskell type <tt>a</tt>
--   
--   This structure is similar to parser. While running
--   <a>RecordFromSql</a> behavior is the same as non-fail-able parser
--   which parse list of database value type [<tt>q</tt>] stream.
--   
--   So, <a>RecordFromSql</a> <tt>q</tt> is <a>Monad</a> and
--   <a>Applicative</a> instance like parser monad. When, you have data
--   constructor and objects like below.
--   
--   <pre>
--   data MyRecord = MyRecord Foo Bar Baz
--   </pre>
--   
--   <pre>
--   foo :: <a>RecordFromSql</a> SqlValue Foo
--   foo =  ...
--   bar :: <a>RecordFromSql</a> SqlValue Bar
--   bar =  ...
--   baz :: <a>RecordFromSql</a> SqlValue Baz
--   baz =  ...
--   </pre>
--   
--   You can get composed <a>RecordFromSql</a> like below.
--   
--   <pre>
--   myRecord :: RecordFromSql SqlValue MyRecord
--   myRecord =  MyRecord &lt;$&gt; foo &lt;*&gt; bar &lt;*&gt; baz
--   </pre>
data RecordFromSql q a

-- | <a>RecordToSql</a> <tt>q</tt> <tt>a</tt> is data-type wrapping
--   function to convert from Haskell type <tt>a</tt> into list of database
--   value type (to send to database) [<tt>q</tt>].
--   
--   This structure is similar to printer. While running <a>RecordToSql</a>
--   behavior is the same as list printer. which appends list of database
--   value type [<tt>q</tt>] stream.
data RecordToSql q a

-- | Generalized prepare inferred from <a>UntypeableNoFetch</a> instance.
prepareNoFetch :: (UntypeableNoFetch s, IConnection conn) => conn -> s p -> IO (PreparedStatement p ())

-- | Typed operation to bind parameters. Inferred <a>ToSql</a> is used.
bind :: ToSql SqlValue p => PreparedStatement p a -> p -> BoundStatement a

-- | Bind parameters, execute prepared statement and get executed
--   statement.
execute :: ToSql SqlValue p => PreparedStatement p a -> p -> IO (ExecutedStatement a)

-- | Bind parameters, execute prepared statement and get execution result.
executeNoFetch :: ToSql SqlValue a => PreparedStatement a () -> a -> IO Integer

-- | Same as <a>prepare</a>.
prepareQuery :: IConnection conn => conn -> Query p a -> IO (PreparedQuery p a)

-- | Fetch a record.
fetch :: FromSql SqlValue a => ExecutedStatement a -> IO (Maybe a)

-- | <i>Lazy-IO</i> version of <a>runQuery'</a>.
runQuery :: (IConnection conn, ToSql SqlValue p, FromSql SqlValue a) => conn -> Query p a -> p -> IO [a]

-- | Prepare SQL, bind parameters, execute statement and strictly fetch all
--   records.
runQuery' :: (IConnection conn, ToSql SqlValue p, FromSql SqlValue a) => conn -> Query p a -> p -> IO [a]

-- | Same as <a>prepare</a>.
prepareInsert :: IConnection conn => conn -> Insert a -> IO (PreparedInsert a)

-- | Prepare insert statement, bind parameters, execute statement and get
--   execution result.
runInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> a -> IO Integer

-- | Same as <a>prepare</a>.
prepareInsertQuery :: IConnection conn => conn -> InsertQuery p -> IO (PreparedInsertQuery p)

-- | Prepare insert statement, bind parameters, execute statement and get
--   execution result.
runInsertQuery :: (IConnection conn, ToSql SqlValue p) => conn -> InsertQuery p -> p -> IO Integer

-- | Same as <a>prepare</a>.
prepareUpdate :: IConnection conn => conn -> Update p -> IO (PreparedUpdate p)

-- | Prepare update statement, bind parameters, execute statement and get
--   execution result.
runUpdate :: (IConnection conn, ToSql SqlValue p) => conn -> Update p -> p -> IO Integer

-- | Same as <a>prepare</a>.
prepareDelete :: IConnection conn => conn -> Delete p -> IO (PreparedDelete p)

-- | Prepare delete statement, bind parameters, execute statement and get
--   execution result.
runDelete :: (IConnection conn, ToSql SqlValue p) => conn -> Delete p -> p -> IO Integer

-- | Same as <a>prepare</a>.
prepareKeyUpdate :: IConnection conn => conn -> KeyUpdate p a -> IO (PreparedKeyUpdate p a)

-- | Typed operation to bind parameters for <a>PreparedKeyUpdate</a> type.
bindKeyUpdate :: ToSql SqlValue a => PreparedKeyUpdate p a -> a -> BoundStatement ()

-- | Prepare insert statement, bind parameters, execute statement and get
--   execution result.
runKeyUpdate :: (IConnection conn, ToSql SqlValue a) => conn -> KeyUpdate p a -> a -> IO Integer
