Package org.jooq

Interface Batch

  • All Superinterfaces:
    java.io.Serializable
    All Known Subinterfaces:
    BatchBindStep

    public interface Batch
    extends java.io.Serializable
    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:
    Statement.executeBatch()
    • Method Detail

      • execute

        int[] execute()
               throws DataAccessException
        Execute the batch operation.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Statement.executeBatch()
      • size

        int size()
        Get the number of executed queries in this batch operation