ibatis
共 3 篇文章
rowhandler的用法
public List<MLProductDO> findAllProductMapping(int count) { final List<MLProductDO> result=new ArrayList<MLProductDO>(); int batchSize = count; List<Object> _data = new ArrayList<Object>(batchSize); getSqlMapClientTemplate().queryWithRowHandler("ML_PRODUCT_MAPPING.findAllProductMapping", new Simple…
2013-09-11 09:27 · ibatis
动态SQL和绑定变量(转)
转自; http://zhuyuehua.iteye.com/blog/1123334 说动态SQL之前先来说下静态SQL 静态SQL语句 语句中主变量的个数与数据类型在预编译时都是确定的,我们称这类嵌入式SQL语句为静态SQL语句。 与之相对应的就是动态SQL 动态SQL方法允许在程序运行过程中临时“组装”SQL语句。 那么他们之间的区别是什么呢? 静态sql的执行计划(DB2称存取路径)是在运行前就确定好的 动态sql的执行计划(DB2称存取路径)是在运行时动态生成的。由于是在运行时动态生成执行计划,因此生成的执行计划(DB2称存取路径)相对更优,但考虑到生成执行计划(DB2称存取路径)…
2011-09-15 14:37 · ibatis
非原生数据类型列值为null时的处理
今天在部署应用的时候发现如下错误: org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in META-INF/ibatis/sqlmap/PT_JOB_REC.xml. --- The error occurred while applying a result map. --- Check the P…
2011-09-06 17:20 · ibatis