relational-query-0.8.3.8: Typeful, Modular, Relational, algebraic query engine

Copyright2013-2017 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Database.Relational.Query.Effect

Contents

Description

This module defines effect statements like update and delete.

Synopsis

Object to express simple restriction.

data Restriction p r Source #

Restriction type with place-holder parameter p and projection record type r.

Instances

TableDerivable r => Show (Restriction p r) Source #

Show where clause.

Methods

showsPrec :: Int -> Restriction p r -> ShowS #

show :: Restriction p r -> String #

showList :: [Restriction p r] -> ShowS #

restriction :: RestrictedStatement r () -> Restriction () r Source #

Finalize Restrict monad and generate Restriction.

restriction' :: RestrictedStatement r (PlaceHolders p) -> Restriction p r Source #

Finalize Restrict monad and generate Restriction with place-holder parameter p

Object to express update target columns and restriction.

data UpdateTarget p r Source #

UpdateTarget type with place-holder parameter p and projection record type r.

Instances

updateTarget :: AssignStatement r () -> UpdateTarget () r Source #

Finalize Target monad and generate UpdateTarget.

updateTarget' :: AssignStatement r (PlaceHolders p) -> UpdateTarget p r Source #

Finalize Target monad and generate UpdateTarget with place-holder parameter p.

liftTargetAllColumn :: PersistableWidth r => Restriction () r -> UpdateTarget r r Source #

Lift Restriction to UpdateTarget. Update target columns are all.

liftTargetAllColumn' :: PersistableWidth r => Restriction p r -> UpdateTarget (r, p) r Source #

Lift Restriction to UpdateTarget. Update target columns are all. With placefolder type p.

updateTargetAllColumn :: PersistableWidth r => RestrictedStatement r () -> UpdateTarget r r Source #

Finalize Restrict monad and generate UpdateTarget. Update target columns are all.

updateTargetAllColumn' :: PersistableWidth r => RestrictedStatement r (PlaceHolders p) -> UpdateTarget (r, p) r Source #

Finalize Restrict monad and generate UpdateTarget. Update target columns are all. With placefolder type p.

Object to express insert terget.

data InsertTarget p r Source #

InsertTarget type with place-holder parameter p and projection record type r.

insertTarget :: Register r () -> InsertTarget () r Source #

Finalize Register monad and generate InsertTarget.

insertTarget' :: Register r (PlaceHolders p) -> InsertTarget p r Source #

Finalize Target monad and generate UpdateTarget with place-holder parameter p.

Generate SQL from restriction.

sqlWhereFromRestriction :: Config -> Table r -> Restriction p r -> StringSQL Source #

SQL WHERE clause StringSQL string from Restriction.

sqlFromUpdateTarget :: Config -> Table r -> UpdateTarget p r -> StringSQL Source #

SQL SET clause and WHERE clause StringSQL string from UpdateTarget

sqlFromInsertTarget :: Config -> Table r -> InsertTarget p r -> StringSQL Source #

SQL INSERT statement StringSQL string from InsertTarget