Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 47390 invoked from network); 13 Jul 2006 21:12:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 21:12:44 -0000 Received: (qmail 62557 invoked by uid 500); 13 Jul 2006 21:12:43 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 62019 invoked by uid 500); 13 Jul 2006 21:12:42 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 62008 invoked by uid 99); 13 Jul 2006 21:12:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 14:12:42 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 14:12:41 -0700 Received: by ug-out-1314.google.com with SMTP id c2so482588ugf for ; Thu, 13 Jul 2006 14:12:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=SRPAxrhnC+3XnDmWg6iij0afDvFD4BtDJQvEBtWoY4xXvdDEOfdIOfnr3iTN71ZbQwN5kZvuikzGj3Jy3HmlNWZhNdTCMJokdwEnmU/DOimMmwondCe9cfUqjPlia/GNEQyoOOQvG6OQsr4+Gco1NZQv8uJH+hlrd73Wr1DJoFE= Received: by 10.66.240.12 with SMTP id n12mr513417ugh; Thu, 13 Jul 2006 14:12:19 -0700 (PDT) Received: by 10.66.238.18 with HTTP; Thu, 13 Jul 2006 14:12:19 -0700 (PDT) Message-ID: Date: Thu, 13 Jul 2006 16:12:19 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: Multiple ResultSet In-Reply-To: <16178eb10607131400p25e8ffb4m44979d0b3bbe45cd@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27334_14474583.1152825139579" References: <001801c6a5ad$1f7c6890$0401a8c0@spring> <00c701c6a5b2$49b9e880$0d10a8c0@coan> <16178eb10607120730y473568c7pb9a17a92fec264d6@mail.gmail.com> <16178eb10607131400p25e8ffb4m44979d0b3bbe45cd@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_27334_14474583.1152825139579 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Makes sense - I hadn't thought about the multiple selects thing. Makes it easier too. I can redo the comma delimited list thing - pretty easy I think. Jeff On 7/13/06, Clinton Begin wrote: > > Brandon and I were looking at this, and we figure that it should be > possible to implement it for both procedures and regular statements (some > DBs support multiple selects in a single statement). > > We shouldn't need a new method on the pulbic interface, as queryForList() > should cover it (a list of "whatevers" -- lists and objects). But > otherwise, sounds good. > > We'd need a comma delimited list of result maps in the configuration > (Brandon's patch for that is sitting on my hard drive, but not checked in). > > Brandon also put Derby into our build so that we can test procs now, > including things like this (although two selects in a single statement might > be a good enough test). > > Cheers, > > Clinton > > > On 7/13/06, Jeff Butler wrote: > > > > I'll take a look at this if you still want help. > > > > Here's what I would do: > > > > - Change it so the you could specify a comma delimited list in the > > resultClass or resultMap on the declaration > > - Add a new method to SqlMapExecuter called executeProcedure that > > returns a list (takes id and optionally a parameter object) > > - The list would contain all result sets from the procedure, and would > > also return any other non-resultSet results (as Objects) from the > > procedure. It would be up to the user to deal with the order - we would > > return in whatever order the procedure returned them. > > - If there are more resultSets than resultMaps, then throw an exception > > - I guess we could add another method that would accept an array of > > RowHandlers too if you think that would be a good idea > > > > Everything else would remain as is - these would be new methods only. > > > > Should be pretty easy to do. > > > > Thoughts?? > > Jeff Butler > > > > > > On 7/12/06, Clinton Begin < clinton.begin@gmail.com> wrote: > > > > > > Not yet, but I'm supposed to be working on that right now. > > > Unfortunately I've been swamped. > > > > > > It should be going out with the next release (2.2.0) -- is anyone > > > interested in taking this over? The earliest I think I'll get to it is next > > > week. > > > > > > Cheers, > > > > > > Clinton > > > > > > > > > > > > On 7/12/06, Cornel Antohi < cantohi@kepler-rominfo.com> wrote: > > > > > > > > Hi, > > > > > > > > Does iBatis support multiple ResultSet returned by a > > > > StoredProcedure? > > > > > > > > Thank you, > > > > Cornel > > > > > > > > > > > > > ------=_Part_27334_14474583.1152825139579 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Makes sense - I hadn't thought about the multiple selects thing.  Makes it easier too.
 
I can redo the comma delimited list thing - pretty easy I think.
 
Jeff

 
On 7/13/06, Clinton Begin <clinton.begin@gmail.com> wrote:
Brandon and I were looking at this, and we figure that it should be possible to implement it for both procedures and regular statements (some DBs support multiple selects in a single statement). 

We shouldn't need a new method on the pulbic interface, as queryForList() should cover it (a list of "whatevers" -- lists and objects).  But otherwise, sounds good. 

We'd need a comma delimited list of result maps in the configuration (Brandon's patch for that is sitting on my hard drive, but not checked in).

Brandon also put Derby into our build so that we can test procs now, including things like this (although two selects in a single statement might be a good enough test).

Cheers,
 
Clinton


On 7/13/06, Jeff Butler < jeffgbutler@gmail.com> wrote:
I'll take a look at this if you still want help.
 
Here's what I would do:
 
- Change it so the you could specify a comma delimited list in the resultClass or resultMap on the <procedure> declaration
- Add a new method to SqlMapExecuter called executeProcedure that returns a list (takes id and optionally a parameter object)
- The list would contain all result sets from the procedure, and would also return any other non-resultSet results (as Objects) from the procedure.  It would be up to the user to deal with the order - we would return in whatever order the procedure returned them.
- If there are more resultSets than resultMaps, then throw an exception
- I guess we could add another method that would accept an array of RowHandlers too if you think that would be a good idea
 
Everything else would remain as is - these would be new methods only.
 
Should be pretty easy to do.
 
Thoughts??
Jeff Butler


On 7/12/06, Clinton Begin < clinton.begin@gmail.com> wrote:
Not yet, but I'm supposed to be working on that right now.  Unfortunately I've been swamped.

It should be going out with the next release (2.2.0) -- is anyone interested in taking this over?  The earliest I think I'll get to it is next week.

Cheers,
 
Clinton



On 7/12/06, Cornel Antohi < cantohi@kepler-rominfo.com> wrote:
Hi,
 
Does iBatis support multiple ResultSet returned by a StoredProcedure?
 
Thank you,
Cornel




------=_Part_27334_14474583.1152825139579--