templates1.Mapper.tmpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of coder-maven-plugin Show documentation
Show all versions of coder-maven-plugin Show documentation
Assist in generating CRUD code, without limitation on the specific language, as long as you can write velocity templates.
#foreach($prop in $pkResult)
#end
#foreach($prop in $columnResult)
#end
#foreach($prop in $pkResult)
${prop.columnName} as "${prop.columnName}",
#end
#foreach($prop in $columnResult)
${prop.columnName} as "${prop.columnName}" #if($velocityCount != $columnResult.size()) , #end
#end
delete from $tableName
where
#foreach($prop in $pkResult)
${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}} #if($velocityCount != $pkResult.size()) , #end
#end
insert into $tableName (
#foreach($prop in $pkResult)
${prop.columnName} ,
#end
#foreach($prop in $columnResult)
${prop.columnName} #if($velocityCount != $columnResult.size()) , #end
#end
) values (
#foreach($prop in $pkResult)
#{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}},
#end
#foreach($prop in $columnResult)
#{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end
#end
)
insert into $tableName (
#foreach($prop in $pkResult)
${prop.columnName} ,
#end
#foreach($prop in $columnResult)
${prop.columnName} #if($velocityCount != $columnResult.size()) , #end
#end
) values (
#foreach($prop in $pkResult)
#{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}},
#end
#foreach($prop in $columnResult)
#{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end
#end
)
update ${tableName}
#foreach($prop in $columnResult)
${prop.columnName} = #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end
#end
where
#foreach($prop in $pkResult)
${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}} #if($velocityCount != $pkResult.size()) , #end
#end
update ${tableName}
set
#foreach($prop in $columnResult)
${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end
#end
where
#foreach($prop in $pkResult)
${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}}
#end
delete from ${tableName}
where ${keyColumn} in
#{item}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy