|
From: <jue...@we...> - 2004-02-16 19:10:06
|
Thomas,
=20
That sounds excellent: simple and intuitive. +1 for implementing it that =
way!
=20
Do you have a chance to implement this within the 1.0 timeframe, i.e. =
ASAP? I'd really like to drop JdbcHelper for 1.0 final.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von tri...@tr...
Gesendet: Mo 16.02.2004 18:26
An: spr...@li...
Betreff: RE: [Springframework-developer] JdbcHelper
I can see the need to go beyond a single row/value type query.
How about a new method for the JdbcTemplate:
Object runSqlStatement(String)
Based on the type of SQL passed in it would return:
1) An Integer containing the number of rows affected if it is an update =
statement
runSqlStatement("update emp set salary =3D salary * 1.5") would return =
an Integer
with the update count
2) A single Object (Integer/Long/String) based on the value returned =
from a
single value/single row query
runSqlStatement("select last_name frmo emp where id =3D 2") would return =
a String
containing the last name
3) An ArrayList of ArrayLists containing a list of rows with a list of =
column
values returned by the query
runSqlStatement("selecy id, last_name from emp") would return an =
ArrayList
containing an ArrayList for each row. The second list would contain an =
Integer
with the id and a String with the last_name.
Number 3 might be a stretch, but we would still have to check for this, =
since we
have no control over the SQL coming in.
Thomas
Quoting rod...@in...:
> I've actually just (yesterday) introduced into into a whole
> bunch of test cases at a client. Maybe we could put an
> improved runSQLFunction() method on JdbcTemplate? This is a
> very convenient one-liner, and basically the only reason I
> use JdbcTemplate.
>
> Regards,
> Rod
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|