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 13:43:51 GMT
Henning P. Schmiedehausen wrote:
> Richard Bayet <bayet@enseirb.fr> writes:
> 
> 
>>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';
> 
> 
> This is just because, the SQL table name and the table name for the
> packages are too closely connected.
> 
> IMHO, the story could go like this:
> 
> - Add a new attribute "per XML schema" or "per table" called "schema"
>   (yes, the name ambiguity sucks); update the DTD
> 
> - Add a new method "getFullTableName()" to the table model which returns
>   the fully qualified "schema.table" if a schema is given, return just
>   "table" else
> 
> - make getTable() only ever return the unqualified table name
> 
> - change the templates to use the one or the other as fitting
> 
> ==> Schema support.
> 
> [... long procedure deleted ...]
> 
> Wow, I wonder how long it took you. Out of curiosity: The generator is
> quite straightforward; IMHO it takes about a day with a debugger to
> understand how it works. How long did it take you to implement this
> procedure and would a generator change not have been easier?
> 
> 	Regards
> 		Henning
> 

Well, I somehow evaluated that :
	+ understanding how the generator works
	+ making the necessary changes
	+ validating theses changes
would cost me more than a day or two.
I chose the laziest way. (That's why I didn't bother to understand the 
.vm files for adding FrontBase support when I noticed that InterBase 
support was almost as efficient).

When you do know about the perl command, and you know about the mass 
rename script, you only have to figure what has to be changed or removed 
inside the files.
4 or 5 shell commands and you go.
The overall procedure (that is including the modifications on the Torque 
Runtime) took me a day and some.

---------------------------------------------------------------------
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