StmtExecute packet
A StmtExecute packet is sent to trigger the execution of a prepared statement that has previously been prepared.
Properties
int sequenceId: the sequence ID for the packet.
String packetType: is always "StmtExecute" - read-only
int statementId: the ID of the statement to execute (returned in a StmtPrepareOK packet)
String sql: the SQL command for the prepared statement that is being executed. In rare cases, this may be null if the client does not close prepared statements properly, and the prepared statement cache is overwhelmed.
int commandType: the numeric type of this command
String commandTypeName: the name for the command type of this packet: "STMT_EXECUTE" - read-only
int flags: the flags for this request. The meaning of these flags is available in the MySQL documentation. These flags are usually easier to access using the following properties:
boolean flagCursorTypeNoCursor
boolean flagCursorTypeReadOnly
boolean flagCursorTypeForUpdate
boolean flagCursorTypeScrollable
boolean flagParameterCountAvailable
int numParameters: the number of parameters being provided to execute the prepared statement. This will be set even if flagParameterCountAvailable is false.
Methods
object getParameter(int index): retrieves the value of the parameter at the (zero-based) specified index. The returned object's type depends on the query, and can be a number, a string, a date, etc...
object getParameterAsShortString(int index): retrieves the value of the parameter at the (zero-based) specified index in the form of a short string. This is useful for logging, or any time you don't necessarily know the type of the parameter.
object getParameterAsType(int index, string type): retrieves the value of the parameter at the specified index, as (if possible) an object of the specified type, which can be one of the standard MySQL types
void setParameter(int index, object value): sets the value of the specified parameter. The value provided must be compatible with the type of the parameter.
object clone(): returns a copy of this packet
void remove(): do not forward this packet