Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 69023 invoked from network); 27 Aug 2004 19:11:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Aug 2004 19:11:25 -0000 Received: (qmail 78722 invoked by uid 500); 27 Aug 2004 19:11:22 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 78566 invoked by uid 500); 27 Aug 2004 19:11:21 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 78552 invoked by uid 99); 27 Aug 2004 19:11:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [128.163.2.151] (HELO mr2.uky.edu) (128.163.2.151) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 27 Aug 2004 12:11:17 -0700 Received: from nm.uky.edu (uksmtp2.uky.edu [128.163.184.23]) by mr2.uky.edu (8.11.6/8.11.6) with ESMTP id i7RJ61E08756 for ; Fri, 27 Aug 2004 15:06:01 -0400 Received: from skkann2 [204.198.74.29] by nm.uky.edu with NetMail ModWeb Module; Fri, 27 Aug 2004 15:06:01 -0400 Subject: Re: Fwd: Putting schema into the select clause Reply-To: saravkrish@uky.edu From: "Saravana Krishnan Kannan" To: torque-user@db.apache.org Date: Fri, 27 Aug 2004 15:06:01 -0400 X-Mailer: NetMail ModWeb Module X-Sender: skkann2 MIME-Version: 1.0 Message-ID: <1093633561.53b86ddcsaravkrish@uky.edu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mail-Router: No infection found X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I dont know much about the DBAdapter class, but can't you let the DBAdapt= er tell you whether SCHEMA.TABLE is allowed by the DB? That sounds like a= nice generic way of doing it. -Sarav. -----Original Message----- From: Steve Toth To: torque-user@db.apache.org Date: Fri, 27 Aug 2004 11:56:54 -0700 Subject: Fwd: Putting schema into the select clause ---------- Forwarded message ---------- From: Steve Toth Date: Fri, 27 Aug 2004 11:55:56 -0700 Subject: Re: Putting schema into the select clause To: "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=3D"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 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 > 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 privile= ged, proprietary, or otherwise private information. If you have received= it in error, please notify the sender immediately and delete the origina= l. 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 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org