com.huoguo.batch.enums.BatchSqlEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-batch Show documentation
Show all versions of simple-batch Show documentation
This is simple based batch write operation tool
The newest version!
package com.huoguo.batch.enums;
/**
* SQL片段枚举类
*
* @author Lizhenghuang
*/
public enum BatchSqlEnum {
/**
* 新增 SQL字符串
**/
INSERT_LIST("insert", "INSERT INTO %s (%s) VALUES (%s)"),
/**
* 编辑 SQL字符串
**/
UPDATE_LIST("update", "UPDATE %s %s WHERE %s"),
/**
* 删除 SQL字符串
**/
DELETE_LIST("delete", "UPDATE %s SET %s WHERE %s");
private final String method;
private final String sql;
BatchSqlEnum(String method, String sql) {
this.method = method;
this.sql = sql;
}
public String getMethod() {
return this.method;
}
public String getSql() {
return this.sql;
}
}