Under the Hood

The SQL checker is invoked by an Ant target and generates a simple Java program which uses SQLJ rather than JDBC. This program is generated into /build/sqlcheck/SQLJTemp.sql. This Java program contains all the elements that should be checked, namely the hand crafted SQL in the model and the Data Manager. Because SQLJ is static SQL the program can be compiled in advance of deployment, provided the database is already created and populated.

The SQL checker can also check the contents of the model for database portability. This is useful in situations where primary development is against one kind of database (for example DB2) but final deployment is against another database (for example DB2 for z/OS). The elements checked for include:

This check is performed because hand-crafted SQL can use the SQL is Null keyword on a host variable. If this is done the Cúram Generator automatically produces a cast to the correct fundamental SQL datatype for the database that is being built against. However, this means that the resultant .ear file cannot be deployed against a database of a different type unless it is completely re-built.