All Downloads are FREE. Search and download functionalities are using the official Maven repository.

im.shs.tick.mybatis.injector.CustomSqlMethod Maven / Gradle / Ivy

The newest version!
package im.shs.tick.mybatis.injector;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 扩展的自定义方法
 *
 * AbstractInsertMethod
 *
 * @author SimpleJuly
 */
@Getter
@AllArgsConstructor
public enum CustomSqlMethod {

	/**
	 * 插入如果中已经存在相同的记录,则忽略当前新数据
	 */
	INSERT_IGNORE_ONE("insertIgnore", "插入一条数据(选择字段插入)", ""),

	/**
	 * 表示插入替换数据,需求表中有PrimaryKey,或者unique索引,如果数据库已经存在数据,则用新数据替换,如果没有数据效果则和insert into一样;
	 */
	REPLACE_ONE("replace", "插入一条数据(选择字段插入)", "");

	private final String method;
	private final String desc;
	private final String sql;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy