public abstract class OffsetFetchQueryRewriter extends DefaultQueryRewriter
Constructor and Description |
---|
OffsetFetchQueryRewriter(JdbcDataContext dataContext,
int minSupportedVersion,
boolean fetchNeedsOrderBy) |
Modifier and Type | Method and Description |
---|---|
boolean |
isFirstRowSupported(Query query)
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 First row property of the query is set, then we
will use the database's "OFFSET i ROWS FETCH NEXT j ROWS ONLY" construct.
|
beforeRewrite, escapeQuotes, isAggregateFunctionSupported, isScalarFunctionSupported, needsQuoting, rewriteColumnType, rewriteFilterItem, rewriteFilterItemWithOperandLiteral, rewriteTimestamp
getColumnType, getDataContext, getResultSetValue, isSchemaIncludedInColumnPaths, isSupportedVersion, isTransactional, rewriteColumnTypeInternal, rewriteFromClause, rewriteFromItem, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteSelectClause, rewriteSelectItem, rewriteWhereClause, setStatementParameter, toTime, toTimestamp
public OffsetFetchQueryRewriter(JdbcDataContext dataContext, int minSupportedVersion, boolean fetchNeedsOrderBy)
public boolean isFirstRowSupported(Query query)
IQueryRewriter
isFirstRowSupported
in interface IQueryRewriter
isFirstRowSupported
in class DefaultQueryRewriter
query
- For some database engines, the content of the query decides
the ability to change first rowpublic boolean isMaxRowsSupported()
IQueryRewriter
isMaxRowsSupported
in interface IQueryRewriter
isMaxRowsSupported
in class DefaultQueryRewriter
public String rewriteQuery(Query query)
rewriteQuery
in interface IQueryRewriter
rewriteQuery
in class AbstractQueryRewriter
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.