org.drizzle.jdbc.internal.common
Interface ParameterizedBatchHandler

All Known Implementing Classes:
DefaultParameterizedBatchHandler, RewriteParameterizedBatchHandler

public interface ParameterizedBatchHandler

Interface that defines a parameterized batch handler. Implement this interface and set it as a parameterized batch handler on the connection like this: if(connection.isWrapperFor(DrizzleConnection.class)) { DrizzleConnection dc = connection.unwrap(DrizzleConnection.class); dc.setBatchQueryHandler(VerrrryFastBatchHandler.class); } Note: implementations currently need a default no-args constructor.


Method Summary
 void addToBatch(ParameterizedQuery query)
          called when a set of parameters are added to a batch.
 int[] executeBatch()
          execute the batch using protocol.
 

Method Detail

addToBatch

void addToBatch(ParameterizedQuery query)
called when a set of parameters are added to a batch.

Parameters:
query - the parameterized query.

executeBatch

int[] executeBatch()
                   throws QueryException
execute the batch using protocol. Return an array of update counts or -2 (Statement.SUCCESS_NO_INFO) if the update count is unknown.

Returns:
a list of update counts
Throws:
QueryException - if something goes wrong executing the query.


Copyright © 2012. All Rights Reserved.