db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject Re: provide a central place for parsing column names in SQLBuilder
Date Fri, 10 Dec 2004 12:02:22 GMT

Hi Henning,

I do not have code yet. I have just done a quick survey to see whether
there are any big obstacles, but I did not find any. I just wanted to make
sure the work is done only once. So if you already have code, just tell me
and go ahead.


"Henning P. Schmiedehausen" <hps@intermeta.de> schrieb am 10.12.2004

> 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
> >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
> >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
> >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
> >splitting between tablename and columnname, which at the moment looks at
> >the first dot in the column name (rawColumnName.indexOf('.')), by
> >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

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

View raw message