Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 73893 invoked from network); 1 Nov 2010 13:39:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Nov 2010 13:39:44 -0000 Received: (qmail 7921 invoked by uid 500); 1 Nov 2010 13:40:15 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 7840 invoked by uid 500); 1 Nov 2010 13:40:13 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 7832 invoked by uid 99); 1 Nov 2010 13:40:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Nov 2010 13:40:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of greg.monroe@dukece.com designates 152.3.166.24 as permitted sender) Received: from [152.3.166.24] (HELO dukece.com) (152.3.166.24) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Nov 2010 13:40:05 +0000 Received: from ([10.123.20.180]) by smtpgw1.dukece.com with ESMTP with TLS id 4440076.20293341; Mon, 01 Nov 2010 09:39:42 -0400 Received: from durham-e2k7mb1.dukece.com ([10.123.20.181]) by durham-e2k7ca1.dukece.com ([10.123.20.180]) with mapi; Mon, 1 Nov 2010 09:39:41 -0400 From: Greg Monroe To: 'Apache Torque Developers List' Date: Mon, 1 Nov 2010 09:39:41 -0400 Subject: RE: created torque 4 branch with village removed Thread-Topic: created torque 4 branch with village removed Thread-Index: Act5Qbw9M4tzhfSAReColcreFtsBPQAhwIhA Message-ID: <55B8568AFA5F144F886F18186BAD5B2C06A8A92945@durham-e2k7mb1.dukece.com> References: <4CCDD33A.4080500@apache.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Great work=0D=0A=0D=0ARe: Prepared statements=2E=2E=0D=0A=0D=0A+1 on making= all calls via prepared=2E As said, helps with SQL injection and probably i= mproves performance for most use cases=2E One possible headache might be t= he CUSTOM=2ESQL =0D=0A=0D=0AQuestion: Can we still do generic record queri= es or is this limited to only Torque table records? E=2Eg=2E, generate "Se= lect t1=2Ecol1, t2=2Ecol1, =2E=2E=2E from t1, t2 where=2E=2E=2E" using Crit= eria, then call something similar to BasePeer=2EdoSelect(c) and process the= results=2E I know this has been a common answer to "Can torque do this=2E= =2E=2E" queries in the past=2E=0D=0A=0D=0A> -----Original Message-----=0D= =0A> From: Thomas Fox [mailto:Thomas=2EFox@seitenbau=2Enet]=0D=0A> Sent: Su= nday, October 31, 2010 5:22 PM=0D=0A> To: Apache Torque Developers List=0D= =0A> Subject: Re: created torque 4 branch with village removed=0D=0A> =0D= =0A> =0D=0A> > >> - check whether to revive the doPsSelect methods or wheth= er all=0D=0A> selects=0D=0A> > > can=0D=0A> > >> use prepared statements=0D= =0A> > >=0D=0A> > > Re-added BasePeer=2EdoPSSelect() for now=2E=0D=0A> >=0D= =0A> > This method has some weaknesses IIRC=2E It dos not work correctly wi= th=0D=0A> > selects containing joins=2E I'd prefer to use prepared statemen= ts for all=0D=0A> > selects if at all possible and I don't think we need se= parate methods=2E=0D=0A> =0D=0A> So would I=2E Much less room for SQL-injec= tion attacks=2E Will take a bit of=0D=0A> work, but if nobody objects, I'll= have a go at it=2E=0D=0A> =0D=0A> > >> - there was come code in doDelete w= hich handled cascading deletes=0D=0A> (at=0D=0A> > > leats=0D=0A> > >> theo= retically, never saw it working) tris needs to be reimplemented=0D=0A> > >= =0D=0A> > > Not re-added=2E The code can definitely not have worked for com= posite=0D=0A> foreign=0D=0A> > > keys because there is no way to tell a com= posite foreign key from the=0D=0A> > > database map=2E=0D=0A> >=0D=0A> > St= ill I'm pretty sure that deletes containing joins do not work=0D=0A> > corr= ectly=2E So there should be another solution some day=2E=0D=0A> =0D=0A> Wha= t do you mean by "deletes containing joins"? A delete which where=0D=0A> cl= ause=0D=0A> contains a join or a delete which deletes from multiple tables?= I'm=0D=0A> pretty=0D=0A> sure the former works now as the table name is no= w specified in the=0D=0A> interface (no magic table-to-delete-from detectio= n from the criteria any=0D=0A> more); not sure whether the latter can work = in SQL=2E=0D=0A> =0D=0A> Would you mind to create a simple test case to sho= w what you mean ?=0D=0A> =0D=0A> > >> - Maybe one can clean up LargeSelect = from the reflection stuff=0D=0A> therein=0D=0A> > >=0D=0A> > > Not while th= e Peers have static methods=2E=0D=0A> > >> =2E=2E=2E=0D=0A> >=0D=0A> > I be= g to differ=2E LargeSelect just tries to call the methods=0D=0A> > addSelec= tColumns() and populateObject() on the given builder class=2E You=0D=0A> > = can provide any class you want here=2E I'd prefer to use some kind of=0D=0A= > > Builder-interface for this, however=2E=0D=0A> =0D=0A> Agreed=2E But doe= s one not still need to have non-static methods for=0D=0A> implementing an = interface=2E=0D=0A> =0D=0A> Thomas=0D=0A> =0D=0A> =0D=0A> --------------= -------------------------------------------------------=0D=0A> To unsubscri= be, e-mail: torque-dev-unsubscribe@db=2Eapache=2Eorg=0D=0A> For additional = commands, e-mail: torque-dev-help@db=2Eapache=2Eorg=0D=0A=0D=0ADukeCE Priva= cy Statement:=0D=0APlease be advised that this e-mail and any files transmi= tted with=0Ait are confidential communication or may otherwise be privilege= d or=0Aconfidential and are intended solely for the individual or entity=0A= to whom they are addressed=2E If you are not the intended recipient=0Ayou m= ay not rely on the contents of this email or any attachments,=0Aand we ask = that you please not read, copy or retransmit this=0Acommunication, but repl= y to the sender and destroy the email, its=0Acontents, and all copies there= of immediately=2E Any unauthorized=0Adissemination, distribution or copying= of this communication is=0Astrictly prohibited=2E --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org