db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: provide a central place for parsing column names in SQLBuilder
Date Fri, 10 Dec 2004 11:57:47 GMT
Thomas Fischer <Fischer@seitenbau.net> writes:

>Hi,

>In the org.apache.torque.util.SQLBuilder class (recently taken out of
>BasePeer), there is a lot of code which parses column names in lots of
>places. I would like to go ahead and see if the existing code can be
>simplified by creating an internal class in SQLBuilder which represents a
>database (pseudo)column, does the parsing and takes care of things like
>aliases. I am not sure whether this works out, as there might be subtle
>differences in the parsing of raw column names e.g. between the FROM part
>and the ORDER BY part of the query, but I'd like to give it a try.

Ah, coincidence strikes again. Part of my reworks was to get the code
in shape to do exactly that. So yes, this is where I will work right
now.

>While doing this, I would also like to check whether static schema support
>can be easily built in. My fist step would be to allow tablenames which
>contain a dot (like SCHEMANAME.TABLENAME). This would mean to replace the
>splitting between tablename and columnname, which at the moment looks at
>the first dot in the column name (rawColumnName.indexOf('.')), by splitting
>at the last dot (rawColumnName.lastIndexOf('.'))
>By the way, is the fully qualified column name
>SCHEMANAME.TABLENAME.COLUMNNAME in all Db's or are there exceptions ?

And this is the reason why I need this. Even worse, I do need to
switch the schema name on the fly.

Do you already have code? 

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

What is more important to you...
   [ ] Product Security
or [ ] Quality of Sales and Marketing Support
              -- actual question from a Microsoft customer survey

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