hssqlppp-0.6.1: SQL parser and type checker

Safe HaskellNone
LanguageHaskell2010

Database.HsSqlPpp.TypeCheck

Contents

Description

Contains functions for typechecking sql asts.

Synopsis

typechecking/ annotation functions

typeCheckStatements :: TypeCheckFlags -> Catalog -> [Statement] -> (Catalog, [Statement]) Source #

Typechecks the ast, and returns the updated catalog (which includes changes from any ddl statements in the ast).

typeCheckScalarExpr :: TypeCheckFlags -> Catalog -> Environment -> ScalarExpr -> ScalarExpr Source #

Not working yet. Typechecks a statement possibly containing ? placeholders. These are annotated with the 'inferred type', and the stType annotation on the return value can be used to get this info easily. Returns Left if the statement is not a query,insert,update or delete statement

data TypeCheckFlags Source #

some options when typechecking

Constructors

TypeCheckFlags 

Fields

data Dialect Source #

Instances

Eq Dialect Source # 

Methods

(==) :: Dialect -> Dialect -> Bool #

(/=) :: Dialect -> Dialect -> Bool #

Data Dialect Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dialect -> c Dialect #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Dialect #

toConstr :: Dialect -> Constr #

dataTypeOf :: Dialect -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Dialect) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Dialect) #

gmapT :: (forall b. Data b => b -> b) -> Dialect -> Dialect #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dialect -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dialect -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dialect -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dialect -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect #

Show Dialect Source # 

defaultTypeCheckFlags :: TypeCheckFlags Source #

reasonable defaults for type checking, doesn't add anything optional