Package groovy.sql

Class BatchingStatementWrapper

    • Field Detail

      • batchSize

        protected int batchSize
      • batchCount

        protected int batchCount
    • Constructor Detail

      • BatchingStatementWrapper

        public BatchingStatementWrapper​(Statement delegate,
                                        int batchSize,
                                        Logger log)
    • Method Detail

      • reset

        protected void reset()
      • invokeMethod

        public Object invokeMethod​(String name,
                                   Object args)
        Description copied from interface: GroovyObject
        Invokes the given method.
        Specified by:
        invokeMethod in interface GroovyObject
        Parameters:
        name - the name of the method to call
        args - the arguments to use for the method call
        Returns:
        the result of invoking the method
      • incrementBatchCount

        protected void incrementBatchCount()
                                    throws SQLException
        Increments batch count (after addBatch(..) has been called) and execute delegate.executeBatch() if batchSize has been reached.
        Throws:
        SQLException
      • processResult

        protected void processResult​(int[] lastResult)