Module SQLConsistency

This module checks whether all referenced table- and column- and relation names exist in the data model. In addition it prepares the translation of insert statements (checking correct number of values, inserting null-values, and column names for completion). Furthermore values for key columns (insert) are transformed to a default value, because the CDBI library supports just auto incrementing keys. It is also ensured that foreign key constraints are just used in select statements and that null-values are not used in conditions (instead of the operators isNull and notNull). Throws an error if one of the above is not given or can not be applied. Generates a warning if the notation of aliases referencing the same table differs or if the notation of table name, column name or relationship name differs from the one given in the data model.

Author: : Julia Krone

Version: : 0.1

Summary of exported operations:

checkConsistency :: WM (PR [Statement]) -> ParserInfo -> Pos -> WM (PR [Statement])   
Invokes the consistency check if a valid AST is given, does nothing otherwise.

Exported operations:

checkConsistency :: WM (PR [Statement]) -> ParserInfo -> Pos -> WM (PR [Statement])   

Invokes the consistency check if a valid AST is given, does nothing otherwise.