db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: SQLToAppData.java
Date Mon, 30 Dec 2002 21:27:35 GMT
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" <Travis.Stevens@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:
> <mailto:turbine-torque-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:turbine-torque-dev-help@jakarta.apache.org>


Mime
View raw message