![JAR search and dependency download from the Maven repository](/logo.png)
ftl.MapperTemplate.ftl Maven / Gradle / Ivy
The newest version!
<#list fieldList as pro>
<#if pro.isPk == 1>
<#else>
#if>
#list>
<#list fieldList as pro>
${pro.name}<#if pro_has_next>,#if>
#list>
INSERT INTO
${tableName}
(
<#list fieldList as pro>
<#if pro.isIdentity==0>
${pro.name}<#if pro_has_next>,#if>
#if>
#list>
)
VALUES
(
<#list fieldList as pro>
<#if pro.isIdentity==0>
<#if pro.name=="gmt_create" || pro.name=="gmt_modify">
now()<#if pro_has_next>,#if>
<#else>
${r'#'}{${pro.proName}}<#if pro_has_next>,#if>
#if>
#if>
#list>
)
UPDATE
${tableName}
SET
<#list fieldList as pro>
<#if pro.isIdentity==0>
<#if pro.name=="gmt_modify">
${pro.name} = now()<#if pro_has_next>,#if>
<#else>
${pro.name} = ${r'#'}{${pro.proName}}<#if pro_has_next>,#if>
#if>
#if>
#list>
WHERE
${fieldPk.name}=${r'#'}{${fieldPk.proName}}
DELETE FROM ${tableName} WHERE ${fieldPk.name}=${r'#'}{${fieldPk.proName}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy