2013年9月15日星期日

ibatis how directly execute sql, sql and also with parameters

I checked Information:

sql statement directly to the string passed with


But my sql is with parameters , how to bind the parameters in the sql it

ask god to help


------ Solution ------------------------------------ --------

  
this sql great is the configuration in the sql table inside , inside with parameters   
 

This situation should not be used ibatis, jdbc should better your situation , both from a performance considerations or from the flexibility to consider , you should consider using jdbc.
------ Solution ---------------------------------------- ----
yourself a whole another routine to use jdbc it.

spring with the jdbctemplet execute your sql, very convenient
------ Solution --------------------- -----------------------
this case or use jdbcTemplate bars , ibatis can not solve , jdbc return result sets and cumbersome process , to sum jdbcTemplate would be more appropriate .
------ For reference only -------------------------------------- -
entire string since you are their own organization , but also bind Gesha , after you organize string passed in ah.

If you want to bind parameters , it is not you this usage it.
------ For reference only -------------------------------------- -


this sql great is the configuration in the sql table inside , inside with parameters

没有评论:

发表评论