当前位置: 首页>>代码示例>>Java>>正文


Java SqlBatch类代码示例

本文整理汇总了Java中org.skife.jdbi.v2.sqlobject.SqlBatch的典型用法代码示例。如果您正苦于以下问题:Java SqlBatch类的具体用法?Java SqlBatch怎么用?Java SqlBatch使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SqlBatch类属于org.skife.jdbi.v2.sqlobject包,在下文中一共展示了SqlBatch类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bulkInsert

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@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);
 
开发者ID:k0kubun,项目名称:gitstar-ranking,代码行数:8,代码来源:RepositoryDao.java

示例2: updateCleanedShardNodes

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("UPDATE deleted_shard_nodes SET clean_time = CURRENT_TIMESTAMP\n" +
        "WHERE shard_uuid = :shardUuid\n" +
        "  AND node_id = :nodeId\n" +
        "  AND clean_time IS NULL\n")
void updateCleanedShardNodes(
        @Bind("shardUuid") Iterable<UUID> shardUuids,
        @Bind("nodeId") int nodeId);
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:ShardManagerDao.java

示例3: updatePurgedShardNodes

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("UPDATE deleted_shard_nodes SET purge_time = CURRENT_TIMESTAMP\n" +
        "WHERE shard_uuid = :shardUuid\n" +
        "  AND node_id = :nodeId\n" +
        "  AND purge_time IS NULL\n")
void updatePurgedShardNodes(
        @Bind("shardUuid") Iterable<UUID> shardUuids,
        @Bind("nodeId") int nodeId);
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:ShardManagerDao.java

示例4: trusteduser

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("MERGE INTO trusteduser (facebookid, macaddress, lastaccess) "
		+ "VALUES (:t.facebookid, "
		+ "COALESCE((SELECT macaddress FROM trusteduser "
		+ "WHERE facebookid = :t.facebookid), :t.macaddress), "
           + "COALESCE((SELECT lastaccess FROM trusteduser "
           + "WHERE facebookid = :t.facebookid), :t.lastaccess)"
		+ ")")
@BatchChunkSize(1000)
public abstract void insertAll(@BindTrustedUser("t") Iterator<TrustedUser> trustedUsers);
 
开发者ID:smartenit-eu,项目名称:smartenit,代码行数:10,代码来源:AbstractTrustedUserDAO.java

示例5: content

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("INSERT INTO content (contentid, size, url, path, "
		+ "quality, cachetype, cachedate, cachescore, "
		+ "category, downloaded, prefetched, vimeoprefetched) "
		+ "VALUES (:c.contentid, :c.size, :c.url, :c.path, "
		+ ":c.quality, :c.cachetype , :c.cachedate , :c.cachescore, "
		+ ":c.category, :c.downloaded, :c.prefetched, :c.vimeoprefetched)")
@BatchChunkSize(1000)
public abstract void insertAll(@BindContent("c") Iterator<Content> contents);
 
开发者ID:smartenit-eu,项目名称:smartenit,代码行数:9,代码来源:AbstractContentDAO.java

示例6: insertBatchByLinkId

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("INSERT INTO SEGMENT "
		+ "(LOCALLINKID, LOCALISPNAME, LEFTBORDER, RIGHTBORDER, A, B) "
		+ "VALUES (:l.localLinkID, :l.localIspName, "
		+ ":costFunctionID , :s.leftBorder, :s.rightBorder, :s.a, :s.b)")
@BatchChunkSize(1000)
public abstract void insertBatchByLinkId(@BindBean("s") List<Segment> slist, 
		@BindBean("l") SimpleLinkID linkID);
 
开发者ID:smartenit-eu,项目名称:smartenit,代码行数:8,代码来源:AbstractSegmentDAO.java

示例7: SNM_MONITOR_TASK

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("INSERT INTO SNM_MONITOR_TASK(MONITOR_ID, TASK_ID) VALUES (:monitorId, :taskId)")
@BatchChunkSize(1000)
void insertMonitorTask(@Bind("monitorId")List<String> monitorIds, @Bind("taskId") String taskId);
 
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:4,代码来源:MonitorTaskDao.java

示例8: values

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".<entry_table>(entry_number, timestamp, key, type) values(:entry_number, :timestampAsLong, :key, :entryType::\"<schema>\".ENTRY_TYPE)")
@BatchChunkSize(1000)
void insertInBatch(@BindEntry Iterable<Entry> entries, @Define("schema") String schema, @Define("entry_table") String entryTable);
 
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:EntryDAO.java

示例9: values

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".<entry_item_table>(entry_number, sha256hex) values (:entryNumber, :sha256hex)")
@BatchChunkSize(1000)
void insertInBatch(@BindBean Iterable<EntryItemPair> entries, @Define("schema") String schema, @Define("entry_item_table") String entryItemTable);
 
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:EntryItemDAO.java

示例10: values

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".index (name, key, sha256hex, start_entry_number, start_index_entry_number) values (:indexName, :key, :itemHash, :startEntryNumber, :startIndexEntryNumber)")
@BatchChunkSize(1000)
void startInBatch(@BindBean Iterable<StartIndex> indexes, @Define("schema") String schema);
 
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:IndexDAO.java

示例11: endInBatch

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("update \"<schema>\".index i set end_entry_number = :endEntryNumber, end_index_entry_number = :endIndexEntryNumber from \"<schema>\".<entry_table> e where e.entry_number = i.start_entry_number and e.entry_number = :entryNumberToEnd and e.key = :entryKey and i.name = :indexName and i.key = :indexKey and i.sha256hex = :itemHash")
@BatchChunkSize(1000)
void endInBatch(@BindBean Iterable<EndIndex> indexes, @Define("schema") String schema, @Define("entry_table") String entryTable);
 
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:IndexDAO.java

示例12: values

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".item(sha256hex, content) values(:sha256hex, :content) on conflict do nothing")
@BatchChunkSize(1000)
void insertInBatch(@BindItem Iterable<Item> items, @Define("schema") String schema );
 
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:ItemDAO.java

示例13: phones

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("INSERT INTO phones (id, contactId, type, phone) VALUES (:id, :contactId, :type, :phone)")
void insertPhones(@BindBean List<Phone> phones, @Bind("contactId") int contactId);
 
开发者ID:qualidafial,项目名称:jdbi-examples,代码行数:3,代码来源:Example06Joins.java

示例14: insertRepairSegments

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch(SQL_INSERT_REPAIR_SEGMENT)
@BatchChunkSize(500)
void insertRepairSegments(
    @BindBean Iterator<RepairSegment> newRepairSegments);
 
开发者ID:thelastpickle,项目名称:cassandra-reaper,代码行数:5,代码来源:IStoragePostgreSql.java

示例15: repository_ranks

import org.skife.jdbi.v2.sqlobject.SqlBatch; //导入依赖的package包/类
@SqlBatch("insert into repository_ranks (stargazers_count, rank, created_at, updated_at) " +
        "values (:stargazersCount, :rank, current_timestamp(), current_timestamp())")
@BatchChunkSize(5000)
void bulkInsert(@BindBean List<RepositoryRank> repoRanks);
 
开发者ID:k0kubun,项目名称:gitstar-ranking,代码行数:5,代码来源:RepositoryRankDao.java


注:本文中的org.skife.jdbi.v2.sqlobject.SqlBatch类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。