db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: Fwd: Putting schema into the select clause
Date Mon, 30 Aug 2004 09:12:33 GMT
Steve Toth <steveftoth@gmail.com> writes:

I will need something similar to this in a current project and will
work on schema stuff. If you already have patches, feel free to send
them to me via personal mail, so we can embed this into the main
torque so that work is not duplicated and all torque users can benefit
from this.

	Regards
		Henning




>---------- Forwarded message ----------
>From: Steve Toth <steveftoth@gmail.com>
>Date: Fri, 27 Aug 2004 11:55:56 -0700
>Subject: Re: Putting schema into the select clause
>To: "mark.a.gold@accenture.com" <mark.a.gold@accenture.com>

>Since I really really like the whole process and idea of Torque I want
>to extend this.

>I've already started to modify the generator and have added a
>schema="blah" attribute to the table element since it makes sence to
>me that tables should have schema information embedded rather then at
>the database level.  Since that way you can have a database of
>multiple schemas all grouped together and do cross schema joins.

>Ok, the big problem seems to me that depending on where in the schema
>clause you need to use slightly different names for the table.

>Sometimes you want to use
>SCHEMA.TABLENAME
>and sometimes just TABLENAME.

>Or do all DBs let you do stuff like
>SELECT SCHEMA.TABLENAME.COLUMN FROM SCHEMA.TABLENAME WHERE
> SCHEMA.TABLENAME.COLUMNB > 5
>??

>If this is the case then all that really needs to be done is change
>the TABLE_NAME variable to be
>SCHEMA.TABLENAME
>rather then what it is now which is just
>TABLENAME

>At which point adding a schema seems almost esoteric, but I think that
>it should be added for the sake of completeness and correctness.  As
>Schema does play a role in the resulting SQL statments that should be
>generated.

>Cause the api seems to use Strings all over the place as keys,
>especially when doing lookups of table related data, it simple uses
>the TABLE_NAME as a key to get column information. So adding schema
>information would mean changing all the critera object as well. I
>believe.

>Any ideas, thoughts, comments?

>To developers of torque, whats the easiest way to start submitting patches?

>On Fri, 27 Aug 2004 10:03:42 -0500, mark.a.gold@accenture.com


><mark.a.gold@accenture.com> wrote:
>> I am in complete agreement and I have no explanation as to why it is
>> omitted. Our workaround in both Oracle and DB2 (mainframe) is to use
>> synonyms. Our security model requires the application log in as a third
>> party so the use of private synonyms was necessary.
>>
>> hth, mark
>>
>>
>>
>> -----Original Message-----
>> From: Steve Toth [mailto:steveftoth@gmail.com]
>> Sent: Friday, August 27, 2004 10:58 AM
>> To: Gold, Mark A.
>> Subject: Re: Putting schema into the select clause
>>
>> Well that is too bad that it doesn't support it yet because it seems
>> like this should be a standard feature as without schema information it
>> seems like this information it will be useless to me as our (albeit
>> insane) database design requires the useage of fully qualified schemas
>> to work properly.
>>
>> How would I go about implementing this in Torque if I wanted to add it?
>> Do it and then make a patch or something.  This seems like a very
>> fundamental change, effecting many low level Torque classes.  Anyone
>> else think that this feature needs to be added?
>>
>> Thanks,
>> Steve Toth
>>
>> On Fri, 27 Aug 2004 08:01:10 -0500, mark.a.gold@accenture.com
>> <mark.a.gold@accenture.com> wrote:
>> > Steve, This is an ongoing issue with Torque and one I have not seen a
>> > solution for. Although some solutions have been offered on this list
>> > there currently seems to be no practical way to fully qualify object
>> > names.
>> >
>> >
>> >
>> > -----Original Message-----
>> > From: Steve Toth [mailto:steveftoth@gmail.com]
>> > Sent: Thursday, August 26, 2004 7:39 PM
>> > To: torque-user@db.apache.org
>> > Subject: Putting schema into the select clause
>> >
>> > I'm trying to use Torque with Oracle and I'm not sure how to get
>> > torque to put the schema before all table names during select
>> > operations...
>> >
>> > Right now the SQL is coming out like this..
>> >
>> > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 FROM TABLE
>> >
>> > I want it to look like this
>> > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 FROM SCHEMA.TABLE
>> >
>> > or
>> > SELECT TABLE.COL1, TABLE.COL2, TABLE.COL3 ,TABLE2.COL1 FROM
>> > SCHEMA.TABLE, SCHEMA2.TABLE2
>> >
>> > What do I need to do in my schema.xml file, or generation ?
>> >
>> > Thanks!
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> > For additional commands, e-mail: torque-user-help@db.apache.org
>> >
>> > This message is for the designated recipient only and may contain
>> > privileged, proprietary, or otherwise private information.  If you
>> > have received it in error, please notify the sender immediately and
>> > delete the original.  Any other use of the email by you is prohibited.
>> >
>>
>> This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information.  If you have received it in error, please notify the sender
immediately and delete the original.  Any other use of the email by you is prohibited.
>>

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

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

"Fighting for one's political stand is an honorable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

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


Mime
View raw message