## org.mariadb.jdbc.internal.com.send
Class ComStmtExecute

    java.lang.Object
      org.mariadb.jdbc.internal.com.send.ComStmtExecute

All Implemented Interfaces:
  InterfaceSendPacket

    public class ComStmtExecute

extends Object
implements InterfaceSendPacket

Constructor Summary
`ComStmtExecute(int statementId, ParameterHolder[] parameters, int parameterCount, ColumnType[] parameterTypeHeader, byte cursorFlag)` Initialize parameters.

Method Summary
`void` `send(PacketOutputStream pos)` Send a prepare statement binary stream.
`static void` `writeCmd(int statementId, ParameterHolder[] parameters, int parameterCount, ColumnType[] parameterTypeHeader, PacketOutputStream pos, byte cursorFlag)` Write COM_STMT_EXECUTE sub-command to output buffer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComStmtExecute

    public ComStmtExecute(int statementId,
                          ParameterHolder[] parameters,
                          int parameterCount,
                          ColumnType[] parameterTypeHeader,
                          byte cursorFlag)

  Initialize parameters.

  Parameters:
    `statementId` - prepareResult object received after preparation.
    `parameters` - parameters
    `parameterCount` - parameters number
    `parameterTypeHeader` - parameters header
    `cursorFlag` - cursor flag. Possible values :
    1. CURSOR_TYPE_NO_CURSOR = fetch all
    2. CURSOR_TYPE_READ_ONLY = fetch by bunch
    3. CURSOR_TYPE_FOR_UPDATE = fetch by bunch with lock ?
    4. CURSOR_TYPE_SCROLLABLE = //reserved, but not working

Method Detail

### writeCmd

    public static void writeCmd(int statementId,
                                ParameterHolder[] parameters,
                                int parameterCount,
                                ColumnType[] parameterTypeHeader,
                                PacketOutputStream pos,
                                byte cursorFlag)
                         throws IOException

  Write COM_STMT_EXECUTE sub-command to output buffer.

  Parameters:
    `statementId` - prepareResult object received after preparation.
    `parameters` - parameters
    `parameterCount` - parameters number
    `parameterTypeHeader` - parameters header1
    `pos` - outputStream
    `cursorFlag` - cursor flag. Possible values :
    1. CURSOR_TYPE_NO_CURSOR = fetch all
    2. CURSOR_TYPE_READ_ONLY = fetch by bunch
    3. CURSOR_TYPE_FOR_UPDATE = fetch by bunch with lock ?
    4. CURSOR_TYPE_SCROLLABLE = //reserved, but not working
  Throws:
    `IOException` - if a connection error occur

### send

    public void send(PacketOutputStream pos)
              throws IOException

  Send a prepare statement binary stream.

  Specified by:
    `send` in interface `InterfaceSendPacket`
  Parameters:
    `pos` - database socket
  Throws:
    `IOException` - if a connection error occur

Copyright © 2017. All rights reserved.