RES_T - result interfacepublic abstract class PreparableStatement<RES_T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PreparableStatement.PreparableStatementFinalizer
PhantomReference to track prepared statement ids. |
protected static class |
PreparableStatement.PreparedState |
| Modifier and Type | Field and Description |
|---|---|
protected MysqlxSession |
mysqlxSession |
protected PreparableStatement.PreparedState |
preparedState |
protected int |
preparedStatementId |
| Constructor and Description |
|---|
PreparableStatement() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deallocatePrepared()
Deallocate this prepared statement from current
MysqlxSession. |
RES_T |
execute()
Executes synchronously this statement either directly or using prepared statements if:
1.
|
protected abstract RES_T |
executePreparedStatement()
Executes a previously server-prepared statement.
|
protected abstract RES_T |
executeStatement()
Executes the statement directly (non-prepared).
|
protected XMessageBuilder |
getMessageBuilder()
Helper method to return an
XMessageBuilder instance from MysqlxSession in use. |
protected abstract XMessage |
getPrepareStatementXMessage()
Returns the
XMessage needed to prepare this statement. |
private boolean |
prepareStatement()
Prepares a statement on the server to be later executed.
|
protected void |
resetPrepareState()
Mark this preparable statement to be deallocated on next execution, if it is currently prepared, or cancel the next prepare.
|
protected void |
setReprepareState()
Mark this preparable statement to be deallocated and re-prepared on next execution, if it is currently prepared.
|
protected int preparedStatementId
protected PreparableStatement.PreparedState preparedState
protected MysqlxSession mysqlxSession
protected XMessageBuilder getMessageBuilder()
XMessageBuilder instance from MysqlxSession in use.XMessageBuilder instance from current MysqlxSessionprotected void resetPrepareState()
protected void setReprepareState()
public RES_T execute()
protected abstract RES_T executeStatement()
protected abstract XMessage getPrepareStatementXMessage()
XMessage needed to prepare this statement. Implementation is dependent on the statement type.XMessage that prepares this statementprivate boolean prepareStatement()
true if the statement was successfully prepared, false otherwiseprotected abstract RES_T executePreparedStatement()
protected void deallocatePrepared()
MysqlxSession.