# Class ComStmtExecute

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

public class ComStmtExecute extends Object

## Constructor Summary

Constructors
Constructor
Description
`ComStmtExecute()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`send(PacketOutputStream pos, int statementId, ParameterHolder[] parameters, int parameterCount, ColumnType[] parameterTypeHeader, byte cursorFlag)`
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 Object

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

## Constructor Details

### ComStmtExecute

public ComStmtExecute()

## Method Details

### 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 static void send(PacketOutputStream pos, int statementId, ParameterHolder[] parameters, int parameterCount, ColumnType[] parameterTypeHeader, byte cursorFlag) throws IOException
Send a prepare statement binary stream.

Parameters:
  `pos` - database socket
  `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
Throws:
  `IOException` - if a connection error occur