# Class AbstractMultiSend

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

public abstract class AbstractMultiSend extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected ColumnType[]`
`parameterTypeHeader`
`protected int`
`statementId`

## Constructor Summary

Constructors
Constructor
Description
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, List<String> queries, ThreadPoolExecutor readScheduler)`
Bulk execute for statement.executeBatch().
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, ClientPrepareResult clientPrepareResult, List<ParameterHolder[]> parametersList, ThreadPoolExecutor readScheduler)`
Bulk execute for client-side PreparedStatement.executeBatch (no prepare).
`AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, ServerPrepareResult serverPrepareResult, List<ParameterHolder[]> parametersList, String sql, ThreadPoolExecutor readScheduler)`
Bulk execute for Server PreparedStatement.executeBatch (when no COM_MULTI)

## Method Summary

Modifier and Type
Method
Description
`void`
`executeBatch()`
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 SQLException`
`handleResultException(SQLException qex, Results results, List<ParameterHolder[]> parametersList, List<String> queries, int currentCounter, int sendCmdCounter, int paramCount, PrepareResult prepareResult)`
`abstract void`
`sendCmd(PacketOutputStream writer, Results results, List<ParameterHolder[]> parametersList, List<String> queries, int paramCount, BulkStatus status, PrepareResult prepareResult)`

### Methods inherited from class Object

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

## Field Details

### statementId

protected int statementId

### parameterTypeHeader

protected ColumnType[] parameterTypeHeader

## Constructor Details

### AbstractMultiSend

public AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, ServerPrepareResult serverPrepareResult, List<ParameterHolder[]> parametersList, String sql, ThreadPoolExecutor readScheduler)
Bulk execute for Server PreparedStatement.executeBatch (when no COM_MULTI)

Parameters:
  `protocol` - protocol
  `writer` - outputStream
  `results` - query results
  `serverPrepareResult` - Prepare result
  `parametersList` - parameters
  `sql` - sql query.
  `readScheduler` - reading thread-pool

### AbstractMultiSend

public AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, ClientPrepareResult clientPrepareResult, List<ParameterHolder[]> parametersList, ThreadPoolExecutor readScheduler)
Bulk execute for client-side PreparedStatement.executeBatch (no prepare).

Parameters:
  `protocol` - current protocol
  `writer` - outputStream
  `results` - results
  `clientPrepareResult` - clientPrepareResult
  `parametersList` - parameters
  `readScheduler` - reading thread-pool

### AbstractMultiSend

public AbstractMultiSend(Protocol protocol, PacketOutputStream writer, Results results, List<String> queries, ThreadPoolExecutor readScheduler)
Bulk execute for statement.executeBatch().

Parameters:
  `protocol` - protocol
  `writer` - outputStream
  `results` - results
  `queries` - query list
  `readScheduler` - reading thread-pool

## Method Details

### sendCmd

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

Throws:
  `SQLException`
  `IOException`

### handleResultException

public abstract SQLException handleResultException(SQLException qex, Results results, List<ParameterHolder[]> parametersList, List<String> queries, int currentCounter, int sendCmdCounter, int paramCount, PrepareResult prepareResult)

### getParamCount

public abstract int getParamCount()

### getTotalExecutionNumber

public abstract int getTotalExecutionNumber()

### getPrepareResult

public PrepareResult getPrepareResult()

### executeBatch

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

Throws:
  `SQLException` - if any error occur