org.apache.metamodel.jdbc.dialects
Class LimitOffsetQueryRewriter
java.lang.Object
org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
org.apache.metamodel.jdbc.dialects.LimitOffsetQueryRewriter
- All Implemented Interfaces:
- IQueryRewriter
- Direct Known Subclasses:
- H2QueryRewriter, MysqlQueryRewriter, PostgresqlQueryRewriter
public abstract class LimitOffsetQueryRewriter
- extends DefaultQueryRewriter
Query rewriter for databases that support LIMIT and OFFSET keywords for max
rows and first row properties.
|
Method Summary |
boolean |
isFirstRowSupported()
Gets whether this query rewriter is able to write the "First row" query
property to the query string. |
boolean |
isMaxRowsSupported()
Gets whether this query rewriter is able to write the "Max rows" query
property to the query string. |
String |
rewriteQuery(Query query)
If the Max rows and/or First row property of the query is set, then we
will use the database's LIMIT and OFFSET functions. |
| Methods inherited from class org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter |
getColumnType, getDataContext, isSchemaIncludedInColumnPaths, rewriteColumnType, rewriteFromClause, rewriteFromItem, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteSelectClause, rewriteSelectItem, rewriteWhereClause |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitOffsetQueryRewriter
public LimitOffsetQueryRewriter(JdbcDataContext dataContext)
isFirstRowSupported
public final boolean isFirstRowSupported()
- Description copied from interface:
IQueryRewriter
- Gets whether this query rewriter is able to write the "First row" query
property to the query string.
- Specified by:
isFirstRowSupported in interface IQueryRewriter- Overrides:
isFirstRowSupported in class DefaultQueryRewriter
- Returns:
- whether this query rewriter is able to write the "First row"
query property to the query string.
isMaxRowsSupported
public final boolean isMaxRowsSupported()
- Description copied from interface:
IQueryRewriter
- Gets whether this query rewriter is able to write the "Max rows" query
property to the query string.
- Specified by:
isMaxRowsSupported in interface IQueryRewriter- Overrides:
isMaxRowsSupported in class DefaultQueryRewriter
- Returns:
- whether this query rewriter is able to write the "Max rows" query
property to the query string.
rewriteQuery
public String rewriteQuery(Query query)
-
If the Max rows and/or First row property of the query is set, then we
will use the database's LIMIT and OFFSET functions.
- Specified by:
rewriteQuery in interface IQueryRewriter- Overrides:
rewriteQuery in class AbstractQueryRewriter
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.