Class ServerPrepareResult
- java.lang.Object
-
- org.mariadb.jdbc.internal.util.dao.ServerPrepareResult
-
- All Implemented Interfaces:
PrepareResult
public class ServerPrepareResult extends Object implements PrepareResult
-
-
Constructor Summary
Constructors Constructor Description ServerPrepareResult(String sql, int statementId, ColumnDefinition[] columns, ColumnDefinition[] parameters, Protocol unProxiedProtocol)
PrepareStatement Result object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeDeallocate()
Asked if can be deallocate (is not shared in other statement and not in cache) Set deallocate flag to true if so.void
decrementShareCounter()
void
failover(int statementId, Protocol unProxiedProtocol)
Update information after a failover.ColumnDefinition[]
getColumns()
int
getParamCount()
ColumnDefinition[]
getParameters()
ColumnType[]
getParameterTypeHeader()
int
getShareCounter()
String
getSql()
int
getStatementId()
Protocol
getUnProxiedProtocol()
boolean
incrementShareCounter()
Increment share counter.void
resetParameterTypeHeader()
void
setAddToCache()
void
setRemoveFromCache()
-
-
-
Constructor Detail
-
ServerPrepareResult
public ServerPrepareResult(String sql, int statementId, ColumnDefinition[] columns, ColumnDefinition[] 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 Detail
-
resetParameterTypeHeader
public void resetParameterTypeHeader()
-
failover
public void failover(int statementId, Protocol unProxiedProtocol)
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()
-
incrementShareCounter
public boolean incrementShareCounter()
Increment share counter.- Returns:
- true if can be used (is not been deallocate).
-
decrementShareCounter
public void decrementShareCounter()
-
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:
getParamCount
in interfacePrepareResult
-
getShareCounter
public int getShareCounter()
-
getStatementId
public int getStatementId()
-
getColumns
public ColumnDefinition[] getColumns()
-
getParameters
public ColumnDefinition[] getParameters()
-
getUnProxiedProtocol
public Protocol getUnProxiedProtocol()
-
getSql
public String getSql()
- Specified by:
getSql
in interfacePrepareResult
-
getParameterTypeHeader
public ColumnType[] getParameterTypeHeader()
-
-