Return-Path: Mailing-List: contact turbine-torque-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list turbine-torque-dev@jakarta.apache.org Received: (qmail 18643 invoked by uid 98); 6 Jan 2003 06:26:49 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 18621 invoked from network); 6 Jan 2003 06:26:47 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 6 Jan 2003 06:26:47 -0000 Received: (qmail 82863 invoked by uid 500); 6 Jan 2003 06:25:19 -0000 Received: (qmail 82856 invoked from network); 6 Jan 2003 06:25:19 -0000 Received: from mta02ps.bigpond.com (144.135.25.134) by daedalus.apache.org with SMTP; 6 Jan 2003 06:25:19 -0000 Received: from [203.98.86.22] ([144.135.25.81]) by mta02ps.bigpond.com (Netscape Messaging Server 4.15 mta02ps Jul 16 2002 22:47:55) with SMTP id H8A4IE00.EI5 for ; Mon, 6 Jan 2003 16:25:26 +1000 Received: from 203.98.86.22 ([203.98.86.22]) by psmam05.mailsvc.email.bigpond.com(MailRouter V3.0n 107/17414704); 06 Jan 2003 16:25:21 User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Mon, 06 Jan 2003 17:25:17 +1100 Subject: Re: [PATCH] using double quotes with postgresql table/column names From: Scott Eade To: Turbine Torque Developers List Message-ID: In-Reply-To: <4.3.2-J.20030106001144.03349c48@smtp.comcast.net> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N To repeat my original reply: 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". Scott -- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au .Mac Chat/AIM: seade at mac dot com On 6/01/2003 5:00 PM, "tek1" wrote: > thanks scott. > > here are the diffs: > > ##### > > Index: columns.vm > =================================================================== > RCS file: > /home/cvspublic/jakarta-turbine-torque/src/templates/sql/base/postgresql/colum > ns.vm,v > retrieving revision 1.4 > diff -r1.4 columns.vm > 0a1 >> #set($_DQ_='"') > 18c19 > < #set ( $entry = "$col.Name $type $size $default $nullString" ) > --- >> #set ( $entry = "$_DQ_$col.Name$_DQ_ $type $size $default $nullString" ) > 20c21 > < #set ( $entry = $strings.select($col.isAutoIncrement(), "$col.Name > $autoIncrement", $entry) ) > --- >> #set ( $entry = $strings.select($col.isAutoIncrement(), > "$_DQ_$col.Name$_DQ_ $autoIncrement", $entry) ) > > ##### > > Index: table.vm > =================================================================== > RCS file: > /home/cvspublic/jakarta-turbine-torque/src/templates/sql/base/postgresql/table > .vm,v > retrieving revision 1.3 > diff -r1.3 table.vm > 5c5 > < $generator.parse("$basepath/drop.vm", "", "table", $tbl) > --- >> ##$generator.parse("$basepath/drop.vm", "", "table", $tbl) > 9c9 > < CREATE TABLE $table.Name > --- >> CREATE TABLE "$table.Name" > > > ##### > > > Index: primarykey.vm > =================================================================== > RCS file: > /home/cvspublic/jakarta-turbine-torque/src/templates/sql/base/postgresql/prima > rykey.vm,v > retrieving revision 1.3 > diff -r1.3 primarykey.vm > 0a1 >> #set($_DQ_='"') > 2c3 > < PRIMARY KEY ($table.printPrimaryKey()), > --- >> PRIMARY KEY ($_DQ_$table.printPrimaryKey()$_DQ_), > > > > ##### > > > Index: createdb.vm > =================================================================== > RCS file: > /home/cvspublic/jakarta-turbine-torque/src/templates/sql/db-init/postgresql/cr > eatedb.vm,v > retrieving revision 1.1 > diff -r1.1 createdb.vm > 2c2 > < drop database $databaseName; > --- >> ##drop database $databaseName; > > > ##### > > > Index: DTDResolver.java > =================================================================== > RCS file: > /home/cvspublic/jakarta-turbine-torque/src/java/org/apache/torque/engine/datab > ase/transform/DTDResolver.java,v > retrieving revision 1.10 > diff -r1.10 DTDResolver.java > 86,87c86,87 > < InputStream dtdStream > < = getClass().getResourceAsStream("database.dtd"); > --- >> //InputStream dtdStream = > getClass().getResourceAsStream("database.dtd"); >> InputStream dtdStream = > this.getClass().getClassLoader().getResourceAsStream("database.dtd"); > 95c95,97 > < } > --- >> } else { >> System.out.println("dtdStream is null."); >> } > > > > > note: i removed the "dropdb"/"droptable" code from some of the templates > b/c i'm only using the create-db and create-tables part of torque from > another program and didn't want torque dropping my tables on each > execution. as such, you can ignore the drop... changes, if you want. > ideally, it would be nice to have the drop template code in separate files > from the create template code. > > thanks again for the great work. it is much appreciated. > > > > At 15:21 03/01/06 +1100, you wrote: >> On 6/01/2003 3:15 PM, "tek1" wrote: >> >>> ok, will do, but what is the cvs login info? it's not mentioned anywhere >>> on the torque page. >> http://jakarta.apache.org/site/cvsindex.html >> >> Scott >> -- >> Scott Eade >> Backstage Technologies Pty. Ltd. >> http://www.backstagetech.com.au >> .Mac Chat/AIM: seade at mac dot com >> >> >> -- >> To unsubscribe, e-mail: >> >> For additional commands, e-mail: >> > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > >