templates.md.btl Maven / Gradle / Ivy
sample
===
* 注释
select ${PS}use("cols")${PE} from ${tableName} where ${PS}use("condition")${PE}
cols
===
<%
print("\t");
for(col in cols){
var colName=col+(colLP.last?"":",");
print(colName);
}%>
updateSample
===
<%
print("\t");
for(col in cols){
var colName=col;
var attr = @nc.getPropertyName(col);
print(colName+"="+PS+attr+PE);
if(!colLP.last){
print(",");
}
}%>
condition
===
1 = 1
<%
for(col in cols){
var colName=col;
var attr = @nc.getPropertyName(col);
%>
${SS}if(!isEmpty(${attr})){${SE}
and ${colName}=${PS+attr+PE}
${SS}}${SE}
<%}%>
jsonMap
===
{
<%
for(col in cols){
var colName=col;
var attr = @nc.getPropertyName(col);
%>
"${attr}":"${colName}"${!colLP.last?","}
<%}%>
}