## org.mariadb.jdbc.internal.protocol
Class AbstractMultiSend

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

    public abstract class AbstractMultiSend

extends Object

Field Summary
`protected ColumnType[]` `parameterTypeHeader`
`protected int` `statementId`

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

Method Summary
`PrepareResult` `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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### statementId

    protected int statementId

### parameterTypeHeader

    protected ColumnType[] parameterTypeHeader

Constructor Detail

### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             Results results,
                             ServerPrepareResult serverPrepareResult,
                             List<ParameterHolder[]> parametersList,
                             boolean readPrepareStmtResult,
                             String sql)

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

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

### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             Results results,
                             ClientPrepareResult clientPrepareResult,
                             List<ParameterHolder[]> parametersList)

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

  Parameters:
    `protocol` - current protocol
    `writer` - outputStream
    `results` - results
    `clientPrepareResult` - clientPrepareResult
    `parametersList` - parameters

### AbstractMultiSend

    public AbstractMultiSend(Protocol protocol,
                             PacketOutputStream writer,
                             Results results,
                             List<String> queries)

  Bulk execute for statement.executeBatch().

  Parameters:
    `protocol` - protocol
    `writer` - outputStream
    `results` - results
    `queries` - query list

Method Detail

### 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)
                                                throws SQLException

  Throws:
    `SQLException`

### getParamCount

    public abstract int getParamCount()

### getTotalExecutionNumber

    public abstract int getTotalExecutionNumber()

### getPrepareResult

    public PrepareResult getPrepareResult()

### executeBatch

    public PrepareResult executeBatch()
                               throws SQLException

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

  Returns:
    prepare result
  Throws:
    `SQLException` - if any error occur

Copyright © 2017. All rights reserved.