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

Portabilityunknown
Stabilityexperimental
Maintainerex8k.hibino@gmail.com
Safe HaskellNone

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)

Show where clause.

type RestrictionContext p r = RestrictedStatement r (PlaceHolders p)Source

Not finalized Restrict monad type.

restriction :: RestrictedStatement r () -> Restriction () rSource

Finalize Restrict monad and generate Restriction.

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

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.

type UpdateTargetContext p r = AssignStatement r (PlaceHolders p)Source

Not finalized Target monad type.

updateTarget :: AssignStatement r () -> UpdateTarget () rSource

Finalize Target monad and generate UpdateTarget.

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

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

liftTargetAllColumn :: PersistableWidth r => Restriction () r -> UpdateTarget r rSource

Lift Restriction to UpdateTarget. Update target columns are all.

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

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

updateTargetAllColumn :: PersistableWidth r => RestrictedStatement r () -> UpdateTarget r rSource

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

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

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

Generate SQL from restriction.

sqlWhereFromRestriction :: Table r -> Restriction p r -> StringSQLSource

SQL WHERE clause StringSQL string from Restriction.

sqlFromUpdateTarget :: Table r -> UpdateTarget p r -> StringSQLSource

SQL SET clause and WHERE clause StringSQL string from UpdateTarget