I am trying to build templates for Informix and have run on some problems.
The relevant files are from today's CVS.
1. As discussed a few weeks ago on this list, Informix (at least versions <
IDS 2000) is hit by the name length of some of the database objects (>18
chars). If I remind the discussion correctly the names of the database
objects should change, to conform to the SQL-Specs, which should require
only 18 chars.
2. In some cases the scheme description contains kind of duplicate index
definitions (TURBINE_USER_GROUP_ROLE, TURBINE_ROLE_PERMISSION). In both
cases all table columns are marked as primary keys, so a combined primary
index is constructed. Additionally an extra index is defined over the same
columns. This leads to an error message "index already exist" under
Informix. The additional index definition seems to be redundant.
3. To get rid of the long names I have tried to change the templates to
shorten the names. The first try was the following (as example "table.vm"):
#set
$dbprops=$properties.load($strings.concat(["templates/sql/",$dbtype,"/db.pro
ps"]))
$generator.parse("sql/informix/drop.vm", "", "table", $tbl)
--> #set $tablename=$table.Name
--> #if($tablename.lenght()>18)
--> CREATE TABLE $tablename.substring(0,18)
--> #else
--> CREATE TABLE $tablename
--> #end
(
...
But this seems to lead to a parser error in velocity. I think the syntax
should be correct?
One additional remark to torque/velocity it would be nice to have the
filename in the generated log file.
Stefan G�nther
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]