ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Multiple select queries in one select tag
Date Mon, 08 Aug 2005 21:50:37 GMT
Of those, point #1 is the one that interests me the most - I have
wanted to do just that. Does a selectKey element allow retrieving more
than one value? I need to try that.

The other two seem esoteric, IMO.

Larry


On 8/8/05, Koka <226057@gmail.com> wrote:
> Hi,
> I'm bringing this topic UP cause IMHO I've found some more arguments
> why iBatis users may need to have multiple statements executed in one
> statement tag.
> 
> 1. Sometimes we have some fields (simplest example = default values,
> or some calculated values) set at the database side, so after an
> INSERT statement we need to retrieve default/calculated values just
> like we retrieve Autonumber or sequence values. OK, one can 'select'
> in next statement (what I curently do)...
> 
> 2. To my taste, I prefer to issue "select 0 from tablename for update
> nowait"  PRIOR to update/delete statement in oracle to make sure
> web-request will not wait for indefinite time but just report that
> someone is editing the record (again, I have to issue two statements
> for update = nowait+actual update) and combine them in CODE - would
> prefer to combine in SQLMap
> 
> 3. (Inspired by the thread discussing temporary tables and requests
> for sql verification)
> Well, seems soon we'll have tools verifing our statements against the
> database (unit tests?). Hmm, if I 'select' from temp table I need to
> test that select statement is executed only after the  creation of
> temporary table...
> 
> So, do we need multiple Statement contained in a single Statement tag?
> 
> Certainly we'll survive without :)
> Wondering what you think, folks
>

Mime
View raw message