org.mariadb.jdbc.internal.protocol

## Class AbstractMultiSend

- java.lang.Object
- - org.mariadb.jdbc.internal.protocol.AbstractMultiSend

    public abstract class AbstractMultiSend
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, ExecutionResult executionResult, ClientPrepareResult clientPrepareResult, List<ParameterHolder[]> parametersList, int resultSetScrollType)` Bulk execute for client-sier PreparedStatement.executeBatch (no prepare).
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, ExecutionResult executionResult, List<String> queries, int resultSetScrollType)` Bulk execute for statement.executeBatch().
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, ExecutionResult executionResult, ServerPrepareResult serverPrepareResult, List<ParameterHolder[]> parametersList, int resultSetScrollType, boolean readPrepareStmtResult, String sql)` Bulk execute for Server PreparedStatement.executeBatch (when no COM_MULTI)

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`PrepareResult` `executeBatch(boolean handleMinusOnePrepare)` Execute Bulk execution (send packets by batch of useBatchMultiSendNumber or when max packet is reached) before reading results.
`abstract int` `getParamCount()`
`PrepareResult` `getPrepareResult()`
`abstract int` `getTotalExecutionNumber()`
`abstract QueryException` `handleResultException(QueryException qex, ExecutionResult executionResult, List<ParameterHolder[]> parametersList, List<String> queries, int currentCounter, int sendCmdCounter, int paramCount, PrepareResult prepareResult)`
`abstract void` `sendCmd(PacketOutputStream writer, ExecutionResult executionResult, List<ParameterHolder[]> parametersList, List<String> queries, int paramCount, BulkStatus status, PrepareResult prepareResult)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             ExecutionResult executionResult,
                             ServerPrepareResult serverPrepareResult,
                             List<ParameterHolder[]> parametersList,
                             int resultSetScrollType,
                             boolean readPrepareStmtResult,
                             String sql)

Bulk execute for Server PreparedStatement.executeBatch (when no COM_MULTI)

Parameters:
  `protocol` - protocol
  `writer` - outputStream
  `executionResult` - query results
  `serverPrepareResult` - Prepare result
  `parametersList` - parameters
  `resultSetScrollType` - resultSet scroll type
  `readPrepareStmtResult` - must execute prepare result
  `sql` - sql query.

#### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             ExecutionResult executionResult,
                             ClientPrepareResult clientPrepareResult,
                             List<ParameterHolder[]> parametersList,
                             int resultSetScrollType)

Bulk execute for client-sier PreparedStatement.executeBatch (no prepare).

Parameters:
  `protocol` - current protocol
  `writer` - outputStream
  `executionResult` - results
  `clientPrepareResult` - clientPrepareResult
  `parametersList` - parameters
  `resultSetScrollType` - resultSet scroll type

#### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             ExecutionResult executionResult,
                             List<String> queries,
                             int resultSetScrollType)

Bulk execute for statement.executeBatch().

Parameters:
  `protocol` - protocol
  `writer` - outputStream
  `executionResult` - results
  `queries` - query list
  `resultSetScrollType` - resultset type

### Method Detail

#### sendCmd

    public abstract void sendCmd(PacketOutputStream writer,
                                 ExecutionResult executionResult,
                                 List<ParameterHolder[]> parametersList,
                                 List<String> queries,
                                 int paramCount,
                                 BulkStatus status,
                                 PrepareResult prepareResult)
                          throws QueryException,
                                 IOException

Throws:
  `QueryException`
  `IOException`

#### handleResultException

    public abstract QueryException handleResultException(QueryException qex,
                                                         ExecutionResult executionResult,
                                                         List<ParameterHolder[]> parametersList,
                                                         List<String> queries,
                                                         int currentCounter,
                                                         int sendCmdCounter,
                                                         int paramCount,
                                                         PrepareResult prepareResult)
                                                  throws QueryException

Throws:
  `QueryException`

#### getParamCount

    public abstract int getParamCount()

#### getTotalExecutionNumber

    public abstract int getTotalExecutionNumber()

#### getPrepareResult

    public PrepareResult getPrepareResult()

#### executeBatch

    public PrepareResult executeBatch(boolean handleMinusOnePrepare)
                               throws QueryException

Execute Bulk execution (send packets by batch of useBatchMultiSendNumber or when max packet is reached) before reading results.

Parameters:
  `handleMinusOnePrepare` - can use '-1' for last prepareStatementId
Returns:
  prepare result
Throws:
  `QueryException` - if any error occur