类 PreparableStatement<RES_T>
- java.lang.Object
-
- com.mysql.cj.xdevapi.PreparableStatement<RES_T>
-
- 类型参数:
RES_T- result interface
- 直接已知子类:
FilterableStatement
public abstract class PreparableStatement<RES_T> extends Object
Abstract class, common to all X DevAPI statement classes that can be prepared.
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classPreparableStatement.PreparableStatementFinalizerPhantomReferenceto track prepared statement ids.protected static classPreparableStatement.PreparedState
-
字段概要
字段 修饰符和类型 字段 说明 protected MysqlxSessionmysqlxSessionprotected PreparableStatement.PreparedStatepreparedStateprotected intpreparedStatementId
-
构造器概要
构造器 构造器 说明 PreparableStatement()
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected voiddeallocatePrepared()Deallocate this prepared statement from currentMysqlxSession.RES_Texecute()Executes synchronously this statement either directly or using prepared statements if: 1.protected abstract RES_TexecutePreparedStatement()Executes a previously server-prepared statement.protected abstract RES_TexecuteStatement()Executes the statement directly (non-prepared).protected XMessageBuildergetMessageBuilder()Helper method to return anXMessageBuilderinstance fromMysqlxSessionin use.protected abstract XMessagegetPrepareStatementXMessage()Returns theXMessageneeded to prepare this statement.protected voidresetPrepareState()Mark this preparable statement to be deallocated on next execution, if it is currently prepared, or cancel the next prepare.protected voidsetReprepareState()Mark this preparable statement to be deallocated and re-prepared on next execution, if it is currently prepared.
-
-
-
字段详细资料
-
preparedStatementId
protected int preparedStatementId
-
preparedState
protected PreparableStatement.PreparedState preparedState
-
mysqlxSession
protected MysqlxSession mysqlxSession
-
-
方法详细资料
-
getMessageBuilder
protected XMessageBuilder getMessageBuilder()
Helper method to return anXMessageBuilderinstance fromMysqlxSessionin use.- 返回:
- the
XMessageBuilderinstance from currentMysqlxSession
-
resetPrepareState
protected void resetPrepareState()
Mark this preparable statement to be deallocated on next execution, if it is currently prepared, or cancel the next prepare.
-
setReprepareState
protected void setReprepareState()
Mark this preparable statement to be deallocated and re-prepared on next execution, if it is currently prepared.
-
execute
public RES_T execute()
Executes synchronously this statement either directly or using prepared statements if: 1. Prepared statements are supported by the server. 2. The statement is executed repeatedly without changing its structure.- 返回:
- the object returned from the low level statement execution
-
executeStatement
protected abstract RES_T executeStatement()
Executes the statement directly (non-prepared). Implementation is dependent on the statement type.- 返回:
- the object returned from the lower level statement execution
-
getPrepareStatementXMessage
protected abstract XMessage getPrepareStatementXMessage()
Returns theXMessageneeded to prepare this statement. Implementation is dependent on the statement type.- 返回:
- the
XMessagethat prepares this statement
-
executePreparedStatement
protected abstract RES_T executePreparedStatement()
Executes a previously server-prepared statement. Implementation is dependent on the statement type.- 返回:
- the object returned from the lower level statement execution
-
deallocatePrepared
protected void deallocatePrepared()
Deallocate this prepared statement from currentMysqlxSession.
-
-