| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | invalid
Has this prepared statement been marked invalid? |
| private CJException | invalidationException
If this statement has been marked invalid, what was the reason? |
| protected boolean | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| protected | ServerPreparedStatement(JdbcConnection
the connection creating us. conn, String the SQL containing the statement to prepare. sql, String the database in use when we were created. db, int ResultSet type resultSetType, int ResultSet concurrency resultSetConcurrency)Creates a new ServerPreparedStatement object. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addBatch()
Overrides com. Implements java. Adds a set of parameters to this |
| private static SQLException | appendMessageToException(SQLException sqlEx, String messageToAppend, ExceptionInterceptor interceptor)
|
| protected void | checkBounds(int parameterIndex, int parameterIndexOffset)
Overrides com.
|
| protected JdbcConnection | checkClosed()
Overrides com. Checks if closed() has been called, and throws an exception if so |
| public void | clearParameters()
Overrides com. Implements java. Clears the current parameter values immediately. |
| protected boolean | |
| public void | doClose(CloseOption...
options indicating how the close was initiated and/or what should be performed during the close options)Overrides com. Implements com. Close this Statement and release resources. |
| protected long[] | executeBatchSerially(long
timeout for the batch execution batchTimeout)Overrides com. Executes the current batch of statements by executing them one-by-one. |
| protected <M extends Message> ResultSetInternalMethods | executeInternal(int
the max number of rows to return maxRowsToRetrieve, M the packet to send sendPacket, boolean should a 'streaming' result set be created? createStreamingResultSet, boolean is this query doing a SELECT? queryIsSelectOnly, ColumnDefinition use this metadata instead of the one provided on wire metadata, boolean is this a batch query? isBatch)Overrides com. Actually execute the prepared statement. |
| protected BindValue | Returns: BindValue1-based parameterIndex, boolean is this for a stream? forLongData)Returns the structure representing the value that (can be)/(is) bound at the given parameter index. |
| protected static ServerPreparedStatement | Returns: new ServerPreparedStatementthe connection creating us. conn, String the SQL containing the statement to prepare. sql, String the database in use when we were created. db, int ResultSet type resultSetType, int ResultSet concurrency resultSetConcurrency)Creates a prepared statement instance |
| public ResultSetMetaData | getMetaData()
Overrides com. Implements java. Retrieves a |
| public ParameterMetaData | getParameterMetaData()
Overrides com. Implements java. Retrieves the number, types and properties of this
|
| public long | |
| protected void | |
| public boolean | isNull(int paramIndex)
Overrides com. Implements com.
|
| protected ClientPreparedStatement | prepareBatchedInsertSQL(JdbcConnection
the connection creating this statement localConn, int number of entries in a batch numBatches)Overrides com. Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs. |
| protected void | |
| protected ResultSetInternalMethods | Returns: result setrows limit maxRowsToRetrieve, boolean should c/J create a streaming result? createStreamingResultSet, ColumnDefinition use this metadata instead of the one provided on wire metadata)Tells the server to execute this prepared statement with the current parameter bindings. |
| protected void | |
| protected void | |
| public void | setPoolable(boolean
requests that the statement be pooled if true and
that the statement not be pooled if false poolable)Overrides com. Implements java. Requests that a |
| public void | setUnicodeStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream a x, int java.io.InputStream object that contains the
Unicode parameter valuethe number of bytes in the stream length)Overrides com. Implements java.
Deprecated
Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
| public void | setURL(int
the first parameter is 1, the second is 2, ... parameterIndex, URL the x)java.net.URL object to be setOverrides com. Implements java. Sets the designated parameter to the given |
| public String | toString()
Overrides com. Returns this PreparedStatement represented as a string. |
| hasOnDuplicateKeyUpdate | back to summary |
|---|---|
| private boolean hasOnDuplicateKeyUpdate | |
| invalid | back to summary |
|---|---|
| private boolean invalid Has this prepared statement been marked invalid? | |
| invalidationException | back to summary |
|---|---|
| private CJException invalidationException If this statement has been marked invalid, what was the reason? | |
| isCacheable | back to summary |
|---|---|
| protected boolean isCacheable | |
| isCached | back to summary |
|---|---|
| protected boolean isCached | |
| ServerPreparedStatement | back to summary |
|---|---|
| protected ServerPreparedStatement(JdbcConnection conn, String sql, String db, int resultSetType, int resultSetConcurrency) throws SQLException Creates a new ServerPreparedStatement object.
| |
| addBatch | back to summary |
|---|---|
| public void addBatch() throws SQLException Overrides com. Implements java. Doc from java. Adds a set of parameters to this
| |
| appendMessageToException | back to summary |
|---|---|
| private static SQLException appendMessageToException(SQLException sqlEx, String messageToAppend, ExceptionInterceptor interceptor) | |
| checkBounds | back to summary |
|---|---|
| protected void checkBounds(int parameterIndex, int parameterIndexOffset) throws SQLException Overrides com.
| |
| checkClosed | back to summary |
|---|---|
| protected JdbcConnection checkClosed() Overrides com. Doc from com. Checks if closed() has been called, and throws an exception if so
| |
| clearParameters | back to summary |
|---|---|
| public void clearParameters() Overrides com. Implements java. Doc from java. Clears the current parameter values immediately. In general, parameter values remain in force for repeated use of a
statement. Setting a parameter value automatically clears its
previous value. However, in some cases it is useful to immediately
release the resources used by the current parameter values; this can
be done by calling the method
| |
| containsOnDuplicateKeyUpdate | back to summary |
|---|---|
| protected boolean containsOnDuplicateKeyUpdate() Overrides com.
| |
| doClose | back to summary |
|---|---|
| public void doClose(CloseOption... options) throws SQLException Overrides com. Implements com. Close this Statement and release resources. By default the close is considered explicit, does not propagate to dependents and allows caching the Statement.
| |
| executeBatchSerially | back to summary |
|---|---|
| protected long[] executeBatchSerially(long batchTimeout) throws SQLException Overrides com. Doc from com. Executes the current batch of statements by executing them one-by-one.
| |
| executeInternal | back to summary |
|---|---|
| protected <M extends Message> ResultSetInternalMethods executeInternal(int maxRowsToRetrieve, M sendPacket, boolean createStreamingResultSet, boolean queryIsSelectOnly, ColumnDefinition metadata, boolean isBatch) throws SQLException Overrides com. Doc from com. Actually execute the prepared statement. This is here so server-side PreparedStatements can re-use most of the code from this class.
| |
| getBinding | back to summary |
|---|---|
| protected BindValue getBinding(int parameterIndex, boolean forLongData) throws SQLException Returns the structure representing the value that (can be)/(is) bound at the given parameter index.
| |
| getInstance | back to summary |
|---|---|
| protected static ServerPreparedStatement getInstance(JdbcConnection conn, String sql, String db, int resultSetType, int resultSetConcurrency) throws SQLException Creates a prepared statement instance
| |
| getMetaData | back to summary |
|---|---|
| public ResultSetMetaData getMetaData() throws SQLException Overrides com. Implements java. Doc from java. Retrieves a
Because a Note Using this method may be expensive for some drivers due to the lack of underlying DBMS support.
| |
| getParameterMetaData | back to summary |
|---|---|
| public ParameterMetaData getParameterMetaData() throws SQLException Overrides com. Implements java. Doc from java. Retrieves the number, types and properties of this
| |
| getServerStatementId | back to summary |
|---|---|
| public long getServerStatementId() Overrides com.
| |
| initQuery | back to summary |
|---|---|
| protected void initQuery() Overrides com.
| |
| isNull | back to summary |
|---|---|
| public boolean isNull(int paramIndex) Overrides com. Implements com.
| |
| prepareBatchedInsertSQL | back to summary |
|---|---|
| protected ClientPreparedStatement prepareBatchedInsertSQL(JdbcConnection localConn, int numBatches) throws SQLException Overrides com. Doc from com. Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs.
| |
| rePrepare | back to summary |
|---|---|
| protected void rePrepare() Used by Connection when auto-reconnecting to retrieve 'lost' prepared statements.
| |
| serverExecute | back to summary |
|---|---|
| protected ResultSetInternalMethods serverExecute(int maxRowsToRetrieve, boolean createStreamingResultSet, ColumnDefinition metadata) throws SQLException Tells the server to execute this prepared statement with the current parameter bindings.
- Server gets the command 'COM_EXECUTE' to execute the
previously prepared query. If there is any param markers;
then client will send the data in the following format:
[COM_EXECUTE:1]
[STMT_ID:4]
[NULL_BITS:(param_count+7)/8)]
[TYPES_SUPPLIED_BY_CLIENT(0/1):1]
[[length]data]
[[length]data] .. [[length]data].
(Note: Except for string/binary types; all other types will not be
supplied with length field)
| |
| serverPrepare | back to summary |
|---|---|
| protected void serverPrepare(String sql) throws SQLException | |
| setClosed | back to summary |
|---|---|
| protected void setClosed(boolean flag) | |
| setPoolable | back to summary |
|---|---|
| public void setPoolable(boolean poolable) throws SQLException Overrides com. Implements java. Doc from java. Requests that a The poolable value of a statement is applicable to both internal statement caches implemented by the driver and external statement caches implemented by application servers and other applications.
By default, a
| |
| setUnicodeStream | back to summary |
|---|---|
| public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException Overrides com. Implements java. Doc from java. Deprecated
Sets the designated parameter to the given input stream, which
will have the specified number of bytes.
When a very large Unicode value is input to a Note This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
| |
| setURL | back to summary |
|---|---|
| public void setURL(int parameterIndex, URL x) throws SQLException Overrides com. Implements java. Doc from java. Sets the designated parameter to the given
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from com. Returns this PreparedStatement represented as a string. | |