Java Code Examples for org.skife.jdbi.v2.sqlobject.SqlBatch

The following examples show how to use org.skife.jdbi.v2.sqlobject.SqlBatch. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: presto   Source File: H2ShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@SqlBatch("MERGE INTO deleted_shards (shard_uuid, delete_time)\n" +
        "VALUES (:shardUuid, CURRENT_TIMESTAMP)")
void insertDeletedShards(@Bind("shardUuid") Iterable<UUID> shardUuids);
 
Example 2
Source Project: presto   Source File: MySqlShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@SqlBatch("INSERT IGNORE INTO deleted_shards (shard_uuid, delete_time)\n" +
        "VALUES (:shardUuid, CURRENT_TIMESTAMP)")
void insertDeletedShards(@Bind("shardUuid") Iterable<UUID> shardUuids);
 
Example 3
Source Project: presto   Source File: ShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch("DELETE FROM shard_nodes\n" +
        "WHERE shard_id = (SELECT shard_id FROM shards WHERE shard_uuid = :shardUuid)\n" +
        "  AND node_id = :nodeId")
void deleteShardNodes(@Bind("shardUuid") UUID shardUuid, @Bind("nodeId") Iterable<Integer> nodeId);
 
Example 4
Source Project: presto   Source File: ShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch("DELETE FROM created_shards WHERE shard_uuid = :shardUuid")
void deleteCreatedShards(@Bind("shardUuid") Iterable<UUID> shardUuids);
 
Example 5
Source Project: presto   Source File: ShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch("DELETE FROM deleted_shards WHERE shard_uuid = :shardUuid")
void deleteCleanedShards(@Bind("shardUuid") Iterable<UUID> shardUuids);
 
Example 6
Source Project: presto   Source File: ShardDao.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch("INSERT INTO buckets (distribution_id, bucket_number, node_id)\n" +
        "VALUES (:distributionId, :bucketNumber, :nodeId)\n")
void insertBuckets(
        @Bind("distributionId") long distributionId,
        @Bind("bucketNumber") List<Integer> bucketNumbers,
        @Bind("nodeId") List<Integer> nodeIds);
 
Example 7
@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);
 
Example 8
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch(SQL_INSERT_REPAIR_SEGMENT)
@BatchChunkSize(500)
void insertRepairSegments(@BindBean Iterator<PostgresRepairSegment> iterator);
 
Example 9
Source Project: airpal   Source File: JobTableDAO.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch(
        "INSERT INTO job_tables (job_id, table_id) " +
                "VALUES (:jobId, :tableId)")
public void createJobTables(@BindBean Iterable<JobTableRow> jobTableRows);
 
Example 10
Source Project: airpal   Source File: TableDAO.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch(
        "INSERT INTO tables (connector_id, schema_, table_, columns) " +
        "VALUES (:connectorId, :schema, :table, :columns)")
@GetGeneratedKeys
public abstract void createTables(@RosettaBinder Iterable<Table> tables);