Field Summary |
|
protected transient int | cacheable Whether this request is cacheable or not. |
protected String | cursorName |
protected boolean | disabledTableExistenceCheck True if the request will not check when running that the table exists in
the database schema. |
protected transient long | endTime |
protected boolean | escapeProcessing Should the backend driver do escape processing before sending to the
database? Simply forwarded to backend driver. |
protected int | fetchSize |
protected long | id Request unique id (set by the controller). |
protected boolean | isAutoCommit Whether this request has been sent in autocommit mode or
not. |
protected transient boolean | isParsed Whether the SQL content has been parsed or not. |
protected boolean | isReadOnly |
protected transient long | logId |
protected String | login Login used to issue this request (must be set by the
VirtualDatabaseWorkerThread). |
protected int | maxRows |
protected String | preparedStatementParameters |
int | requestType Rationale is to avoid the performance cost of .instanceof(), at
serialization time and elsewhere. |
protected boolean | requiresConnectionFlush True if the request requires current connection to be closed instead of
beeing given back to the pool. |
protected boolean | requiresConnectionPoolFlush True if the request requires all connections to be closed to take effect. |
protected String | sqlQueryOrTemplate SQL query (should be set in constructor) or query template if this is a
PreparedStatement. |
protected transient long | startTime |
protected int | timeoutInSeconds Timeout for this request in seconds, value 0 means no timeout (should be
set in constructor). |
protected long | transactionId Transaction identifier if this request belongs to a transaction. |
protected int | transactionIsolation Transaction isolation level to use when executing the query inside a
transaction. |
protected transient String | uniqueKey Unique key identifying the query. |
protected SortedSet | writeLockedTables Sorted list of table names that must be locked in write. |
Method Summary |
|
protected void | addDependingTables(DatabaseSchema schema, SortedSet lockedTables) Add depending tables to the list of tables already contained in the
provided set. |
abstract public boolean | altersAggregateList() Returns true if this request invalidates somehow the Aggregate List. |
abstract public boolean | altersDatabaseCatalog() Returns true if this request invalidates somehow the Database Catalog. |
abstract public boolean | altersDatabaseSchema() Returns true if this request invalidates somehow the Database Schema. |
abstract public boolean | altersMetadataCache() Returns true if this request invalidates somehow the Metadata Cache. |
abstract public boolean | altersQueryResultCache() Returns true if this request invalidates somehow the Query Result Cache. |
abstract public boolean | altersSomething() Returns true if this request invalidates somehow any Sequoia internal
structure or caches (true if any of the other abstract altersXXX methods
returns true). |
abstract public boolean | altersStoredProcedureList() Returns true if this request invalidates somehow the Stored Procedure List. |
abstract public boolean | altersUserDefinedTypes() Returns true if this request invalidates somehow the User Defined Types. |
abstract public boolean | altersUsers() Returns true if this request invalidates somehow the Users definition or
rights. |
abstract public void | cloneParsing(AbstractRequest request) Clones the parsing of a request. |
public void | debug() Displays some debugging information about this request. |
public boolean | equals(Object other) Two requests are equal if they have the same unique id. |
public int | getCacheAbility() Returns the cacheable status of this request. |
public String | getClientIpAddress() Returns the clientIpAddress value. |
public String | getCursorName() Returns the cursorName value. |
public long | getEndTime() Returns the endTime value. |
public boolean | getEscapeProcessing() |
public long | getExecTimeInMs() Return the request execution time in milliseconds. |
public int | getFetchSize() Returns the fetchSize value. |
public long | getId() Returns the unique id of this request. |
public String | getLineSeparator() Returns the lineSeparator used in the request string (required to parse
it). |
final public long | getLogId() Returns the logId value. |
public String | getLogin() Returns the login used to issue this request. |
public boolean | getMacrosAreProcessed() Returns true if macros have already been processed in the request. |
public int | getMaxRows() Get the maximum number of rows the ResultSet can contain. |
public String | getParsingResultsAsString() |
final public long | getPersistentConnectionId() Returns the persistentConnectionId value. |
public String | getPreparedStatementParameters() |
public boolean | getRetrieveSQLWarnings() |
public String | getSqlOrTemplate() Gets the SQL code of this request if this is a statement or sql template
(with ? as parameter placeholders) if this is a PreparedStatement. |
public String | getSqlShortForm(int nbOfCharacters) Get a short form of this request if the SQL statement exceeds
nbOfCharacters.
Parameters: nbOfCharacters - number of characters to include in the short form. |
public long | getStartTime() Returns the startTime value. |
public int | getTimeout() Gets the timeout for this request in seconds. |
public long | getTransactionId() Gets the identifier of the transaction if this request belongs to a
transaction, or -1 if this request does not belong to a transaction. |
public int | getTransactionIsolation() Returns the transaction isolation level. |
public String | getType() Get the type of the request as a String. |
public String | getUniqueKey() Returns the unique key identifying this request. |
public SortedSet | getWriteLockedDatabaseTables() Returns the list of database table names that must be write locked by the
execution of this request.
SortedSet of String containing table names to be write locked bythis request. |
public int | hashCode() |
final public boolean | isAlter() Returns true if this request in a ALTER
statement. |
public boolean | isAutoCommit() Returns true if the request should be executed in
autocommit mode. |
final public boolean | isCreate() Returns true if this request in a CREATE
statement. |
final public boolean | isDelete() Returns true if this request in a DELETE
statement. |
final public boolean | isDrop() Returns true if this request in a DROP
statement. |
final public boolean | isInsert() Returns true if this request in an INSERT
statement. |
final public boolean | isLazyTransactionStart() Returns true if this request triggers a lazy transaction start that
requires a 'begin' to be logged into the reocvery log. |
public boolean | isParsed() Returns true if the request SQL content has been already
parsed. |
final public boolean | isPersistentConnection() Returns the persistentConnection value. |
public boolean | isReadOnly() |
final public boolean | isSelect() Returns true if this request in a SELECT
statement. |
final public boolean | isUpdate() Returns true if this request in an UPDATE
statement. |
abstract public boolean | needsMacroProcessing() Returns true if this request requires macro (RAND(), NOW(),
...) processing. |
abstract public void | parse(DatabaseSchema schema, int granularity, boolean isCaseSensitive) Parses the SQL request and extract the selected columns and tables given
the DatabaseSchema of the database targeted by this request.
An exception is thrown when the parsing fails. |
public boolean | requiresConnectionFlush() Returns the requiresConnectionFlush value. |
public boolean | requiresConnectionPoolFlush() Returns the requiresConnectionPoolFlush value. |
public void | setCacheAbility(int cacheAbility) Set the cacheable status of this request. |
public void | setClientIpAddress(String clientIpAddress) Sets the clientIpAddress value. |
public void | setCursorName(String cursorName) Sets the cursorName value. |
public void | setEndTime(long endTime) Sets the endTime value. |
public void | setFetchSize(int fetchSize) Sets the fetchSize value. |
public void | setId(long id) Sets the unique id of this request. |
public void | setIsAutoCommit(boolean isAutoCommit) Sets the autocommit mode for this request. |
public void | setIsLazyTransactionStart(boolean isLazyStart) Set a flag to tell whether this request triggers a lazy transaction start
that requires a 'begin' to be logged into the reocvery log. |
public void | setIsReadOnly(boolean isReadOnly) Sets the read-only mode for this request. |
final public void | setLineSeparator(String lineSeparator) Sets the lineSeparator value. |
final public void | setLogId(long logId) Sets the logId value. |
public void | setLogin(String login) Sets the login to use to issue this request. |
public void | setMacrosAreProcessed(boolean macrosAreProcessed) Sets the macrosAreProcessed value. |
public void | setMaxRows(int rows) Set the maximum number of rows in the ResultSet. |
final public void | setPersistentConnection(boolean persistentConnection) Sets the persistentConnection value. |
final public void | setPersistentConnectionId(long persistentConnectionId) Sets the persistentConnectionId value. |
public void | setPreparedStatementParameters(String params) |
public void | setRetrieveSQLWarnings(boolean isRetrieveSQLWarnings) |
public void | setSqlOrTemplate(String sql) Set the SQL statement or PreparedStatement template of this request.
Warning! The request parsing validity is not checked. |
public void | setStartTime(long startTime) Sets the startTime value. |
public void | setTimeout(int timeout) Sets the new timeout in seconds for this request. |
public void | setTransactionId(long id) Sets the transaction identifier this request belongs to. |
public void | setTransactionIsolation(int isolationLevel) |
public boolean | tableExistenceCheckIsDisabled() Returns the disabledTableExistenceCheck value. |
public String | toDebugString() Returns a String containing debug information about this
request. |
public String | toShortDebugString() Returns a one line String containing debug information about
this request. |
public String | toString() |
public String | toStringShortForm(int nbOfCharacters) Same as toString but use a short form limited to the number of character
provided. |
public String | trimCarriageReturnAndTabs() If the query has a skeleton defined, return the skeleton with all carriage
returns and tabs replaced with spaces. |