@SqlBatch("INSERT INTO keys (number, device_id, key_id, public_key, last_resort) VALUES " + "(:number, :device_id, :key_id, :public_key, :last_resort)") abstract void append(@PreKeyBinder List<KeyRecord> preKeys);
public BatchHandler(Class<?> sqlObjectType, ResolvedMethod method) { super(sqlObjectType, method); Method raw_method = method.getRawMember(); SqlBatch anno = raw_method.getAnnotation(SqlBatch.class); this.sql = SqlObject.getSql(anno, raw_method); this.transactional = anno.transactional(); this.batchChunkSize = determineBatchChunkSize(sqlObjectType, raw_method); }
public BatchHandler(Class<?> sqlObjectType, ResolvedMethod method) { super(sqlObjectType, method); Method raw_method = method.getRawMember(); SqlBatch anno = raw_method.getAnnotation(SqlBatch.class); this.sql = SqlObject.getSql(anno, raw_method); this.transactional = anno.transactional(); this.batchChunkSize = determineBatchChunkSize(sqlObjectType, raw_method); }
@SqlBatch("insert into users (id, type, login, avatar_url, created_at, updated_at) " + "values (:id, :type, :login, :avatarUrl, current_timestamp(), current_timestamp()) " + "on duplicate key update login=values(login), avatar_url=values(avatar_url), updated_at=values(updated_at)") @BatchChunkSize(100) void bulkInsert(@BindBean List<User> users);
@SqlBatch void create(@SmartBindBean Iterable<RolledUpUsageModelDao> usages, @SmartBindBean final InternalCallContext context);
@SqlBatch("INSERT INTO module_provides (moduleId, name) VALUES (:moduleId, :name)") void insertProvides(@BindWithRosetta Set<ModuleDependency> dependencies);
@SqlBatch("insert into repositories " + "(id, owner_id, name, full_name, description, fork, homepage, stargazers_count, language, created_at, updated_at, fetched_at) " + "values (:id, :ownerId, :name, :fullName, :description, :fork, :homepage, :stargazersCount, :language, current_timestamp(), current_timestamp(), current_timestamp()) " + "on duplicate key update " + "owner_id=values(owner_id), name=values(name), full_name=values(full_name), description=values(description), homepage=values(homepage), stargazers_count=values(stargazers_count), language=values(language), updated_at=values(updated_at), fetched_at=values(fetched_at)") @BatchChunkSize(100) void bulkInsert(@BindBean List<Repository> repos);