public final class CachedPrepareResultPacket extends PrepareResultPacket
statementId| Constructor and Description |
|---|
CachedPrepareResultPacket(com.singlestore.jdbc.client.ReadableByteBuf buffer,
Reader reader,
com.singlestore.jdbc.client.Context context)
Cache prepare result with flag indicating use
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cache()
indicate that result is in LRU cache
|
void |
close(com.singlestore.jdbc.client.Client con)
Indicate that a prepare statement must be closed (if not in LRU cache)
|
void |
decrementUse(com.singlestore.jdbc.client.Client con,
ServerPreparedStatement preparedStatement)
Decrement use of prepare packet, so closing it if last used
|
int |
getStatementId()
Return prepare statement id.
|
void |
incrementUse(BasePreparedStatement preparedStatement)
Increment use of prepare statement.
|
void |
reset() |
void |
unCache(com.singlestore.jdbc.client.Client con)
Indicate that Prepare command is not on LRU cache anymore.
|
getColumns, getParameters, setColumnspublic CachedPrepareResultPacket(com.singlestore.jdbc.client.ReadableByteBuf buffer,
Reader reader,
com.singlestore.jdbc.client.Context context)
throws IOException
buffer - prepare packet bufferreader - packet readercontext - connection contextIOException - if any socket error occurspublic void close(com.singlestore.jdbc.client.Client con)
throws SQLException
close in interface Prepareclose in class PrepareResultPacketcon - current connectionSQLException - if SQLpublic void decrementUse(com.singlestore.jdbc.client.Client con,
ServerPreparedStatement preparedStatement)
throws SQLException
PrepareResultPacketdecrementUse in interface PreparedecrementUse in class PrepareResultPacketcon - connectionpreparedStatement - current prepared statement that was using prepare objectSQLException - if exception occurspublic void incrementUse(BasePreparedStatement preparedStatement)
preparedStatement - new statement using prepare resultpublic void unCache(com.singlestore.jdbc.client.Client con)
con - current connectionpublic boolean cache()
public int getStatementId()
getStatementId in interface PreparegetStatementId in class PrepareResultPacketpublic void reset()
Copyright © 2025 SingleStore. All rights reserved.