This module resolves the pseudonym-tablename-binding for all columns and all relationship constraints in each parsed statement with the help of a symboltable. Errors are thrown whenever an alias can not be resolved, because it was not defined or is not visible or it was defined more than once. An error is also thrown for an alias that was defined but not used.
nameStatements
:: PM [Statement] -> Pos -> PM [Statement]
Takes a list of completely parsed statements (wrapped in a PM), inserts the name of the corresponding table (resolving the pseudonym if given) and sets the right alias (int) for CDBI in each AST-node representing a column. |
Takes a list of completely parsed statements (wrapped in a PM), inserts the name of the corresponding table (resolving the pseudonym if given) and sets the right alias (int) for CDBI in each AST-node representing a column. The correct CDBI-alias is also set for each table-node and relationship-constraint-node. An error is thrown, if the referenced alias was not defined in the corresponding statement or if it is defined more than once. Consistence with the data model is not checked at this stage. PM with named columns otherwise |