jdbc的preparestatement+动态sql,要如何迁移到ibatis里面
已知sql语句select id from table where column1=?,column2=?.....(可能包含orderby,联合,子查询等等),以及每个?对应的值,按顺序存在List<Object> values中,原应用使用jdbc的preparestatement实现的,现在要放到ibatis里面,因为sql语句构建不受控,因此不要想把它变成静态的map配置,
现在sqlmap里面我是这样写的
<select id="abatorgenerated_selectByExample" resultClass="java.util.HashMap" parameterClass="com.soulda.dms.osworkflow.spi.ibatis.dbobject.SpecialExample" >
$sql$
</select>
要如何写才能把values中的值apply到sql中?