Module SQLTyper

Module for checking the type integrity of SQL expressions. This includes ensuring the same type on both sides of (binary) operations and in case expressions, correct types in insert and update statements and in all occasions in which at least one column reference is given. Furthermore foreign keys are marked for a proper translation in later modules. In addition it is ensured that no key columns can be updated directly, that aggregation functions are called with the correct type, embedded expressions are not compared with each other and null-values can't be used in case-expression. Warnings are generated in case the type of an embedded expression was set using context information. The module is organized in two stages. The first one retrieves all kind of information about the used types from the parser info module. The second stage checks the correct usage. of the types.

Author: : Julia Krone

Version: : 0.1

Summary of exported operations:

checkTypes :: WM (PR [Statement]) -> Map String String -> Pos -> WM (PR [Statement])  Deterministic 
Organized in two stages: 1.

Exported operations:

checkTypes :: WM (PR [Statement]) -> Map String String -> Pos -> WM (PR [Statement])  Deterministic 

Organized in two stages:

  1. retrieving types from parser info
  2. check type integrity of expressions

If the first stage fails the second one is not started. First stage is only started if a valid AST without errors is passed.