templates.ibatis.ftl Maven / Gradle / Ivy
<#list model.cols as prop>
${prop.colName}<#if prop_has_next>,#if>
#list>
delete from ${model.tableName}
<#list model.cols as col>
<#if col.isPk>
${col.colName} = ${r'#{'}${col.fieldName}${r'}'}
#if>
#list>
insert into ${model.tableName}
(
<#list model.cols as col>
${col.colName}<#if col_has_next>,#if>
#list>
)
values
(
<#list model.cols as col>
${r'#{'}${col.fieldName}${r'}'}<#if col_has_next>,#if>
#list>
)
update ${model.tableName}
<#list model.cols as col>
<#if !col.isPk>
${col.colName}=${r'#{'}${col.fieldName}${r'}'}<#if col_has_next>,#if>
#if>
#list>
where
<#list model.cols as col>
<#list model.pks as pk>
<#if col.colName = pk>${col.colName}=${r'#{'}${col.fieldName}${r'}'}<#if pk_has_next> and #if>#if>
#list>
#list>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy