Class ServerPrepareResult
java.lang.Object
org.mariadb.jdbc.internal.util.dao.ServerPrepareResult
- All Implemented Interfaces:
PrepareResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ColumnInformation[]private final AtomicBooleanprivate booleanprivate final ColumnInformation[]private ColumnType[]private intprivate final Stringprivate intprivate Protocol -
Constructor Summary
ConstructorsConstructorDescriptionServerPrepareResult(String sql, int statementId, ColumnInformation[] columns, ColumnInformation[] parameters, Protocol unProxiedProtocol) PrepareStatement Result object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAsked if can be deallocate (is not shared in other statement and not in cache) Set deallocate flag to true if so.voidvoidUpdate information after a failover.intintgetSql()intbooleanIncrement share counter.voidvoidvoid
-
Field Details
-
columns
-
parameters
-
sql
-
inCache
-
statementId
private int statementId -
parameterTypeHeader
-
unProxiedProtocol
-
isBeingDeallocate
private volatile boolean isBeingDeallocate
-
-
Constructor Details
-
ServerPrepareResult
public ServerPrepareResult(String sql, int statementId, ColumnInformation[] columns, ColumnInformation[] parameters, Protocol unProxiedProtocol) PrepareStatement Result object.- Parameters:
sql- querystatementId- server statement Id.columns- columns informationparameters- parameters informationunProxiedProtocol- indicate the protocol on which the prepare has been done
-
-
Method Details
-
resetParameterTypeHeader
public void resetParameterTypeHeader() -
failover
Update information after a failover.- Parameters:
statementId- new statement IdunProxiedProtocol- the protocol on which the prepare has been done
-
setAddToCache
public void setAddToCache() -
setRemoveFromCache
public void setRemoveFromCache() -
canBeDeallocate
public boolean canBeDeallocate()Asked if can be deallocate (is not shared in other statement and not in cache) Set deallocate flag to true if so.- Returns:
- true if can be deallocate
-
getParamCount
public int getParamCount()- Specified by:
getParamCountin interfacePrepareResult
-
getStatementId
public int getStatementId() -
getColumns
-
getParameters
-
getUnProxiedProtocol
-
getSql
- Specified by:
getSqlin interfacePrepareResult
-
getParameterTypeHeader
-