You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Dan Diephouse <da...@envoisolutions.com> on 2002/12/25 07:03:19 UTC

Commons dbcp dependency

Could whoever set the dependency to commons-dbcp-1.1-dev-20021215 find 
their copy of the jar and upload to ibiblio?

Thanks,

Dan Diephouse




Re: SQLToAppData.java

Posted by Scott Eade <se...@backstagetech.com.au>.
Travis,

Patches are welcome, but can you please do the following:

1. Create unidiff patch files (cvs diff -u)
2. Create a patch issue in the appropriate module in Scarab
(http://scarab.werken.com/scarab/issues/) that describes the problem and
attach your patch file.  In this case the module would be "Torque > Source".

Thanks,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com

On 31/12/2002 7:28 AM, "Travis Stevens" <Tr...@noaa.gov> wrote:

> I'm not a torque developer, and I'm not exacty sure what to do, so I'm
> posting.
> 
> I have added personal code to SQLToAppData.java so that primary and
> foreign key information is added if an oracle "ALTER TABLE ADD PRIMARY
> KEY" or "ALTER TABLE ADD FOREIGN KEY" statement is encountered.
> 
> Attached is the diff output of the 3.0 version and my version (55
> lines).  It would be nice to see this incorperated into the code.
> 
> -Trav
> 
> 191c191,237
> < 
> ---
>>     
>>     /**
>>      * Parses a ALTER TABLE FOO command.
>>      *
>>      * @throws ParseException
>>      */
>>     private void Alter() throws ParseException
>>     {
>>         next();
>>         if (token.getStr().toUpperCase().equals("TABLE"))
>>         {
>>             Alter_Table();
>>         }
>>     }
>>     
>>     /**
>>      * Parses a CREATE TABLE sql command
>>      */
>>     private void Alter_Table() throws ParseException
>>     {
>>         next();
>>         String tableName = token.getStr(); // name of the table
>>         Table tbl = appDataDB.getTable(tableName);
>>         next();
>>         
>>         if (token.getStr().toUpperCase().equals("ADD")){
>>             Alter_Table_Add(tbl);
>>         }
>>     }
>>     
>>     /**
>>      * Parses an ALTER TABLE foo ADD sql command
>>      */
>>     private void Alter_Table_Add(Table table) throws ParseException
>>     {
>>         next();
>>         if (token.getStr().toUpperCase().equals("FOREIGN"))
>>         {
>>             Create_Table_Column_Foreign(table);
>>         }
>>         else if (token.getStr().toUpperCase().equals("PRIMARY"))
>>         {
>>             Create_Table_Column_Primary(table);
>>         }
>>     }
>>     
>>     
> 577a624,627
>>             }
>>             else if (token.getStr().toUpperCase().equals("ALTER"))
>>             {
>>                 Alter();
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>


SQLToAppData.java

Posted by Travis Stevens <Tr...@noaa.gov>.
I'm not a torque developer, and I'm not exacty sure what to do, so I'm 
posting.

I have added personal code to SQLToAppData.java so that primary and 
foreign key information is added if an oracle "ALTER TABLE ADD PRIMARY 
KEY" or "ALTER TABLE ADD FOREIGN KEY" statement is encountered.

Attached is the diff output of the 3.0 version and my version (55 
lines).  It would be nice to see this incorperated into the code.

-Trav