Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains functions for typechecking sql asts.
- typeCheckStatements :: TypeCheckingFlags -> Catalog -> [Statement] -> (Catalog, [Statement])
- typeCheckParameterizedStatement :: TypeCheckingFlags -> Catalog -> Statement -> Either String Statement
- typeCheckQueryExpr :: TypeCheckingFlags -> Catalog -> QueryExpr -> QueryExpr
- typeCheckScalarExpr :: TypeCheckingFlags -> Catalog -> ScalarExpr -> ScalarExpr
- typeCheckScalarExprEnv :: TypeCheckingFlags -> Catalog -> Environment -> ScalarExpr -> ScalarExpr
- data TypeCheckingFlags = TypeCheckingFlags {}
- data SQLSyntaxDialect
- defaultTypeCheckingFlags :: TypeCheckingFlags
typechecking/ annotation functions
typeCheckStatements :: TypeCheckingFlags -> Catalog -> [Statement] -> (Catalog, [Statement])
Typechecks the ast, and returns the updated catalog (which includes changes from any ddl statements in the ast).
typeCheckParameterizedStatement :: TypeCheckingFlags -> Catalog -> Statement -> Either String Statement
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
typeCheckQueryExpr :: TypeCheckingFlags -> Catalog -> QueryExpr -> QueryExpr
Typecheck a query expr
typeCheckScalarExpr :: TypeCheckingFlags -> Catalog -> ScalarExpr -> ScalarExpr
type check a scalar expr
typeCheckScalarExprEnv :: TypeCheckingFlags -> Catalog -> Environment -> ScalarExpr -> ScalarExpr
data TypeCheckingFlags
some options when typechecking
TypeCheckingFlags | |
|
data SQLSyntaxDialect
The dialect of SQL to use.
defaultTypeCheckingFlags :: TypeCheckingFlags
reasonable defaults for type checking, doesn't add anything optional