db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Bayet <ba...@enseirb.fr>
Subject Re: provide a central place for parsing column names in SQLBuilder
Date Tue, 14 Dec 2004 07:42:17 GMT
Henning P. Schmiedehausen wrote:
> 
>>Just out of curiosity : have you tried what happens if one puts
>>"schemaname.tablename" as tablename into schema.xml ? That might also be
>>interesting for some people.
> 
> 
> No. Testers welcome.
> 
> 
As for Torque Gen 3.1, this might be a bad idea.
Because the class and packages names will contain this extra dot character.
Not very annoying for the packages names : the classes will be tagged as 
in package 'com.yourproject.schemaname' instead of 'com.yourproject', 
but the classes will be named like 'schemaname.yourtable';

The technique I used a few month ago, where I add to generate the OM of 
several FrontBase schema (not officially supported : I used the 
InterBase adapter), was :
1) modify the Torque runtime to support "really fully qualified 
columnnames", that is "schema.table.column".
It was quickly done, just looking for every string "table.column" 
splitting (this is made using "indexOf('.')" tests) and adding a test on 
the presence of two dots.

2) write procedure which consisted in :
	+ prefixing every table name in the schema.xml by "SCHEMA_MYSCHEMANAME_"
	+ generating the java code
	+ using perl rewriting commands (perl -pi.bak -s ....) to change back 
the table and column names
	+ using a "mass rename" zsh script to change or remove some incorrect 
prefix of the filenames

If anyone is interested, I might post the complete story, and name a few 
  drawbacks...

Regards,
Richard.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message