public class DefaultQueryRewriter extends AbstractQueryRewriter
logger
Constructor and Description |
---|
DefaultQueryRewriter(JdbcDataContext dataContext) |
Modifier and Type | Method and Description |
---|---|
protected Query |
beforeRewrite(Query query)
Method to modify query before rewriting begins.
|
String |
escapeQuotes(String item)
Escapes the quotes within a String literal of a query item.
|
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.
|
boolean |
isScalarFunctionSupported(ScalarFunction function)
Determines whether a specific scalar function is supported by the
database or not.
|
String |
rewriteColumnType(ColumnType columnType,
Integer columnSize)
Rewrites the name of a column type, as it is written in CREATE TABLE
statements.
|
String |
rewriteFilterItem(FilterItem item) |
getColumnType, getDataContext, isSchemaIncludedInColumnPaths, isTransactional, rewriteColumnTypeInternal, rewriteFromClause, rewriteFromItem, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteQuery, rewriteSelectClause, rewriteSelectItem, rewriteWhereClause
public DefaultQueryRewriter(JdbcDataContext dataContext)
protected Query beforeRewrite(Query query)
AbstractQueryRewriter
beforeRewrite
in class AbstractQueryRewriter
public String rewriteColumnType(ColumnType columnType, Integer columnSize)
IQueryRewriter
rewriteColumnType
in interface IQueryRewriter
rewriteColumnType
in class AbstractQueryRewriter
columnType
- the (non-null) ColumnType
to rewritecolumnSize
- the (possibly null) column size that may or may not have been
specifiedpublic String rewriteFilterItem(FilterItem item)
rewriteFilterItem
in interface IQueryRewriter
rewriteFilterItem
in class AbstractQueryRewriter
public boolean isScalarFunctionSupported(ScalarFunction function)
IQueryRewriter
public boolean isFirstRowSupported()
IQueryRewriter
public boolean isMaxRowsSupported()
IQueryRewriter
public String escapeQuotes(String item)
IQueryRewriter
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.