Class OracleQueryExpression
java.lang.Object
org.castor.cpa.persistence.sql.driver.JDBCQueryExpression
org.castor.cpa.persistence.sql.driver.OracleQueryExpression
- All Implemented Interfaces:
QueryExpression
QueryExpression for Oracle 7/8.
As of release 8.1.6, Oracle supports limiting the number of rows returned by a query
through the use of the following mechanism.
SELECT *
FROM (
SELECT empno, ename, job, sal,
rank() over (order by sal) rnk
FROM emp
)
WHERE rnk BETWEEN 3 AND 8
- Version:
- $Revision: 8104 $ $Date: 2005-03-24 03:45:01 -0700 (Thu, 24 Mar 2005) $
- Author:
- Assaf Arkin
-
Nested Class Summary
Nested classes/interfaces inherited from class org.castor.cpa.persistence.sql.driver.JDBCQueryExpression
JDBCQueryExpression.Join -
Field Summary
Fields inherited from class org.castor.cpa.persistence.sql.driver.JDBCQueryExpression
_dbInfo, _distinct, _factory, _joins, _limit, _offset, _order, _select, _tablesFields inherited from interface org.exolab.castor.persist.spi.QueryExpression
OP_BETWEEN, OP_BETWEEN_AND, OP_EQUALS, OP_GREATER, OP_GREATER_EQUALS, OP_LESS, OP_LESS_EQUALS, OP_LIKE, OP_NOT_EQUALS, OP_NOT_LIKE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStatement(boolean lock) Creates a SQL statement.booleanIndicates that Oracle supports an OQL LIMIT clause for versions >= 8.1.6.booleanIndicates that Oracle supports an OQL OFFSET clause for versions >= 8.1.6.Methods inherited from class org.castor.cpa.persistence.sql.driver.JDBCQueryExpression
addColumn, addCondition, addInnerJoin, addLimitClause, addOffsetClause, addOrderClause, addOuterJoin, addParameter, addSelect, addTable, addWhereClause, addWhereClause, clone, encodeColumn, getColumnList, getStandardStatement, setDbMetaInfo, setDistinct, toString
-
Constructor Details
-
OracleQueryExpression
-
-
Method Details
-
getStatement
Description copied from class:JDBCQueryExpressionCreates a SQL statement. In general, for a RDBMS/JDBC driver with a full support of the SQL standard/JDBC specification, this will return a valid SQL statement. For some features, a particular RDBMS might indicate that it does not support this feature by throwing aSyntaxNotSupportedException.- Specified by:
getStatementin interfaceQueryExpression- Overrides:
getStatementin classJDBCQueryExpression- Parameters:
lock- True if a write lock is required- Returns:
- The SQL statement
- Throws:
SyntaxNotSupportedException- If the RDBMS does not support a particular feature.
-
isLimitClauseSupported
public boolean isLimitClauseSupported()Indicates that Oracle supports an OQL LIMIT clause for versions >= 8.1.6.- Specified by:
isLimitClauseSupportedin interfaceQueryExpression- Overrides:
isLimitClauseSupportedin classJDBCQueryExpression- Returns:
- true to indicate that Oracle supports an OQL LIMIT clause.
- See Also:
-
isOffsetClauseSupported
public boolean isOffsetClauseSupported()Indicates that Oracle supports an OQL OFFSET clause for versions >= 8.1.6.- Specified by:
isOffsetClauseSupportedin interfaceQueryExpression- Overrides:
isOffsetClauseSupportedin classJDBCQueryExpression- Returns:
- true to indicate that Oracle supports an OQL OFFSET clause.
- See Also:
-