use of com.baidu.unbiz.common.genericdao.param.IncrParam in project disconf by knightliao.
the class QueryGenerator method appendModifytoSQL.
/**
* @param modifies
* @param sb
* @param params
*/
private void appendModifytoSQL(List<Modify> modifies, StringBuilder sb, List<Object> params) {
for (Modify modify : modifies) {
sb.append(modify.getColumn());
Object value = modify.getValue();
if (value instanceof IncrParam) {
sb.append("=(").append(modify.getColumn()).append("+?),");
params.add(((IncrParam) value).getValue());
} else if (value instanceof ExpressionParam) {
sb.append(',');
} else {
sb.append("=?,");
params.add(value);
}
}
}
Aggregations