X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 93F8AD1B1AB for ; Mon, 21 Jun 2004 09:53:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83589-08 for ; Mon, 21 Jun 2004 12:53:45 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 65DFAD1B169 for ; Mon, 21 Jun 2004 09:53:40 -0300 (ADT) Received: (qmail 6565 invoked from network); 21 Jun 2004 12:53:42 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 21 Jun 2004 12:53:42 -0000 Subject: Re: proposal for CallableStatements to handle multiple out From: Dave Cramer Reply-To: pg@fastcrypt.com To: Oliver Jowett Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: <40D59C71.2060904@opencloud.com> References: <1087582419.15586.173.camel@localhost.localdomain> <40D37653.8010302@opencloud.com> <1087602030.15607.190.camel@localhost.localdomain> <40D386F7.3040401@opencloud.com> <1087605866.15619.193.camel@localhost.localdomain> <40D39015.8090507@opencloud.com> <1087655403.15586.206.camel@localhost.localdomain> <40D59C71.2060904@opencloud.com> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1087822421.6047.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 21 Jun 2004 08:53:41 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/129 X-Sequence-Number: 10331 Oliver, It is more of a Strategy object. As you pointed out I have to use a strategy object. I'm not interested in "winning"; I'm more interested in implementing this in such a way as to not muck up the current code, and add CallableStatement functionality in such a way that if, in the future postgres supports multiple out parms, it will be easy to change. Dave On Sun, 2004-06-20 at 10:17, Oliver Jowett wrote: > Dave Cramer wrote: > > No, > > > > What I was planning on doing is encapsulating all the code that parses > > the sql, and rewrites it into a small class, StatementSqlParser > > implement SqlParser, then changing the contstructor for > > AbstractJdbc1Statment to > > > > AbstractJdbc1Statement( Connection, SqlParser ) > > > > Then I could create a second class CallableSqlParser which would deal > > with the differences in CallableStatements. > > So essentially the SqlParser is a strategy object, or maybe strategy + > some state? Which object holds what state? > > -O > > > > !DSPAM:40d59c25234101391917376! > > -- Dave Cramer 519 939 0336 ICQ # 14675561