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
checkTypes
:: PM [Statement] -> Map String String -> Pos -> PM [Statement]
Organized in two stages: 1. |