Module org.jooq
Package org.jooq

Interface Batch

All Superinterfaces:
Flow.Publisher<Integer>, Publisher<Integer>, org.reactivestreams.Publisher<Integer>, Serializable
All Known Subinterfaces:
BatchBindStep

public interface Batch extends Serializable, Publisher<Integer>
A wrapper for a JDBC batch operation. It has two modes:

  1. Execute several queries without bind values
    
     create.batch(query1,
                  query2,
                  query3)
           .execute();
     
  2. Execute one query several times with bind values
    
     create.batch(query)
           .bind(valueA1, valueA2)
           .bind(valueB1, valueB2)
           .execute();
     
Author:
Lukas Eder
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int @NotNull []
    Execute the batch operation.
    @NotNull CompletionStage<int[]>
    Execute the batch operation in a new CompletionStage.
    @NotNull CompletionStage<int[]>
    Execute the query in a new CompletionStage that is asynchronously completed by a task running in the given executor.
    int
    Get the number of executed queries in this batch operation

    Methods inherited from interface org.jooq.Publisher

    subscribe

    Methods inherited from interface org.reactivestreams.Publisher

    subscribe