Upgrade Guides for Genero BDL / 2.51 upgrade guide |
Better support for Informix DATETIME types emulation within SQLite.
Before version 2.51, DATETIME SQL types where converted to SQLite types as follows:
Since most DATETIME types were converted to TIMESTAMP, it was not possible to distinguish common date/time types such as DATETIME HOUR TO MINUTE or DATETIME YEAR TO MINUTE, especially when extracting the database schema with fgldbsch: Type information was lost and this prevented schema-base variable definitions with DEFINE LIKE.
Starting with version 2.51, common DATETIME SQL types are now mapped to different types in SQLite, for a better support of these types. In fact, SQLite allows to define table columns with custom types (you can use any type name), however the number of tokens in the syntax is limited so it's not possible to use for ex the tokens DATETIME YEAR TO SECOND directly. The Genero database driver uses this SQLite SQL language feature to map Informix-style DATETIME types to specific custom types. For example, a DATETIME HOUR TO MINUTE becomes a SMALLTIME, a DATETIME YEAR TO FRACTION(2) becomes a DATETIME(2), etc. Further, the data values inserted in the database do now match exactly the precision of the original DATETIME type. For more details about date/time mapping and emulation, see DATE and DATETIME data types.