ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: [Feature request] add one more parameter to execute sql method
Date Wed, 06 Aug 2008 06:17:41 GMT
Insert a proxy SqlMapClient implementation that does the wrapping for you.

Cheers,
Clinton

On Wed, Aug 6, 2008 at 12:09 AM, Jiming Liu <jimingliu@gmail.com> wrote:

> Hi Clinton,
>
> I have been thinking about defined a sharding architecture for a while by
> using iBatis. And I found if iBatis core lib could add some serveral more
> methods, it would be more helpful. As following,
>
> Object     insert(String statementName, Object parameterObject, Object
> sharding)
> Object     queryForObject(String statementName, Object parameterObject,
> Object sharding)
> ...
> ...
> and so on
>
> and in the xml file
>
>   <insert id="insertOrgType" parameterClass="OrgType">
>     INSERT INTO dic_org_type$sharding.suffix$ (
>       id
>       , status
>       , code
>       , name
>       , short_name
>     ) VALUES (
>       #id#
>       , #status#
>       , #id#
>       , #name#
>       , #shortName#
>     )
>   </insert>
>
>
> Of course, I can wrap "parameterObject" and "sharding" into a map then
> passed in as a whole parameter object. But that is ugly, isn't it?
>
> Thanks!
>
> Jiming
>
>
>
>
>

Mime
View raw message