本文整理了Java中org.apache.ibatis.annotations.Options
类的一些代码示例,展示了Options
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options
类的具体详情如下:
包路径:org.apache.ibatis.annotations.Options
类名称:Options
暂无
代码示例来源:origin: qiurunze123/miaosha
@Insert("insert into miaosha_message (id , messageid ,content , create_time ,status,over_time,message_type ,send_type , good_name , price,messageHead)" +
"value (#{id},#{messageId},#{content},#{createTime},#{status},#{overTime},#{messageType},#{sendType},#{goodName},#{price},#{messageHead}) ")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
public void insertMiaoShaMessage(MiaoShaMessageInfo miaoShaMessage);
代码示例来源:origin: baomidou/mybatis-plus
keyGenerator = configuration.isUseGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
} else {
keyGenerator = options.useGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
keyProperty = options.keyProperty();
keyColumn = options.keyColumn();
if (FlushCachePolicy.TRUE.equals(options.flushCache())) {
flushCache = true;
} else if (FlushCachePolicy.FALSE.equals(options.flushCache())) {
flushCache = false;
useCache = options.useCache();
fetchSize = options.fetchSize() > -1 || options.fetchSize() == Integer.MIN_VALUE ? options.fetchSize() : null; //issue #348
timeout = options.timeout() > -1 ? options.timeout() : null;
statementType = options.statementType();
resultSetType = options.resultSetType();
languageDriver,
options != null ? nullOrEmpty(options.resultSets()) : null);
代码示例来源:origin: com.intoverflow.booster/booster-core
boolean generated = false;
if (methodOptions != null) {
generated = methodOptions.useGeneratedKeys();
if (generated) {
adapter.setKeyGenerator(Jdbc3KeyGenerator.INSTANCE);
adapter.setKeyProperty(methodOptions.keyProperty());
adapter.setKeyColumn(methodOptions.keyColumn());
代码示例来源:origin: qiurunze123/miaosha
@Insert("insert into miaosha_message_user (id , userid ,messageid , goodid ,orderid)" +
"value (#{id},#{userId},#{messageId},#{goodId},#{orderId}) ")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
public void insertMiaoShaMessageUser(MiaoShaMessageUser miaoShaMessageUser);
代码示例来源:origin: camunda/camunda-bpm-platform
keyGenerator = configuration.isUseGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
} else {
keyGenerator = options.useGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
keyProperty = options.keyProperty();
keyColumn = options.keyColumn();
if (FlushCachePolicy.TRUE.equals(options.flushCache())) {
flushCache = true;
} else if (FlushCachePolicy.FALSE.equals(options.flushCache())) {
flushCache = false;
useCache = options.useCache();
fetchSize = options.fetchSize() > -1 || options.fetchSize() == Integer.MIN_VALUE ? options.fetchSize() : null; //issue #348
timeout = options.timeout() > -1 ? options.timeout() : null;
statementType = options.statementType();
resultSetType = options.resultSetType();
languageDriver,
options != null ? nullOrEmpty(options.resultSets()) : null);
代码示例来源:origin: abel533/Mapper
/**
* 插入数据库,`null`值也会插入,不会使用列的默认值
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insert(T record);
代码示例来源:origin: org.mybatis/mybatis
keyGenerator = configuration.isUseGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
} else {
keyGenerator = options.useGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
keyProperty = options.keyProperty();
keyColumn = options.keyColumn();
if (FlushCachePolicy.TRUE.equals(options.flushCache())) {
flushCache = true;
} else if (FlushCachePolicy.FALSE.equals(options.flushCache())) {
flushCache = false;
useCache = options.useCache();
fetchSize = options.fetchSize() > -1 || options.fetchSize() == Integer.MIN_VALUE ? options.fetchSize() : null; //issue #348
timeout = options.timeout() > -1 ? options.timeout() : null;
statementType = options.statementType();
resultSetType = options.resultSetType();
languageDriver,
options != null ? nullOrEmpty(options.resultSets()) : null);
代码示例来源:origin: abel533/Mapper
/**
* 批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等,另外该接口限制实体包含`id`属性并且必须为自增列
*
* @param recordList
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertList(List<? extends T> recordList);
代码示例来源:origin: org.apache.ibatis/ibatis-core
String keyProperty = "id";
if (options != null) {
flushCache = options.flushCache();
useCache = options.useCache();
fetchSize = options.fetchSize() > -1 ? options.fetchSize() : null;
timeout = options.timeout() > -1 ? options.timeout() : null;
statementType = options.statementType();
resultSetType = options.resultSetType();
keyGenerator = options.useGeneratedKeys() ? new Jdbc3KeyGenerator() : new NoKeyGenerator();
keyProperty = options.keyProperty();
代码示例来源:origin: abel533/Mapper
/**
* 批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等,另外该接口限制实体包含`id`属性并且必须为自增列
*
* @param recordList
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertList(List<? extends T> recordList);
代码示例来源:origin: com.intoverflow.booster/booster-core
keyGenerator = assistant.getConfiguration().isUseGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
} else {
keyGenerator = options.useGeneratedKeys() ? Jdbc3KeyGenerator.INSTANCE : NoKeyGenerator.INSTANCE;
keyProperty = options.keyProperty();
keyColumn = options.keyColumn();
if (Options.FlushCachePolicy.TRUE.equals(options.flushCache())) {
flushCache = true;
} else if (Options.FlushCachePolicy.FALSE.equals(options.flushCache())) {
flushCache = false;
useCache = options.useCache();
fetchSize = options.fetchSize() > -1 || options.fetchSize() == Integer.MIN_VALUE ? options.fetchSize() : null; //issue #348
timeout = options.timeout() > -1 ? options.timeout() : null;
statementType = options.statementType();
resultSetType = options.resultSetType();
代码示例来源:origin: abel533/Mapper
/**
* 插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertUseGeneratedKeys(T record);
代码示例来源:origin: abel533/Mapper
/**
* 插入数据库,`null`值也会插入,不会使用列的默认值
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insert(T record);
代码示例来源:origin: abel533/Mapper
/**
* 插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertUseGeneratedKeys(T record);
代码示例来源:origin: qiurunze123/miaosha
@Insert("insert into miaosha_user (id , nickname ,password , salt ,head,register_date,last_login_date)value (#{id},#{nickname},#{password},#{salt},#{head},#{registerDate},#{lastLoginDate}) ")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
public void insertMiaoShaUser(MiaoshaUser miaoshaUser);
代码示例来源:origin: abel533/Mapper
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insertSelective(T record);
代码示例来源:origin: abel533/Mapper
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insertSelective(T record);
代码示例来源:origin: zhegexiaohuozi/SeimiCrawler
@Insert("insert into blog (title,content,update_time) values (#{blog.title},#{blog.content},now())")
@Options(useGeneratedKeys = true, keyProperty = "blog.id")
int save(@Param("blog") BlogContent blog);
}
代码示例来源:origin: rhwayfun/spring-boot-learning-examples
@Insert(SqlConstants.INSERT_SLAVE_SQL)
@Options(useGeneratedKeys = true, keyProperty = "userId")
int insertSlave(UserEntity user);
代码示例来源:origin: mybatis-book/book
@Insert({"insert into sys_role(role_name, enabled, create_by, create_time)",
"values(#{roleName}, #{enabled}, #{createBy}, #{createTime, jdbcType=TIMESTAMP})"})
@Options(useGeneratedKeys = true, keyProperty = "id")
int insert2(SysRole sysRole);
内容来源于网络,如有侵权,请联系作者删除!