org.apache.metamodel.jdbc.dialects
Class DB2QueryRewriter
java.lang.Object
org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
org.apache.metamodel.jdbc.dialects.DB2QueryRewriter
- All Implemented Interfaces:
- IQueryRewriter
public class DB2QueryRewriter
- extends DefaultQueryRewriter
- implements IQueryRewriter
Query rewriter for IBM DB2
| Methods inherited from class org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter |
getColumnType, getDataContext, 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 |
DB2QueryRewriter
public DB2QueryRewriter(JdbcDataContext dataContext)
escapeQuotes
public String escapeQuotes(String filterItemOperand)
- Description copied from interface:
IQueryRewriter
- Escapes the quotes within a String literal of a query item.
- Specified by:
escapeQuotes in interface IQueryRewriter- Overrides:
escapeQuotes in class DefaultQueryRewriter
- Returns:
- String item with quotes escaped.
isSchemaIncludedInColumnPaths
public boolean isSchemaIncludedInColumnPaths()
- DB2 expects the fully qualified column name, including schema, in select
items.
- Overrides:
isSchemaIncludedInColumnPaths in class AbstractQueryRewriter
isMaxRowsSupported
public 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.
isFirstRowSupported
public 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.
rewriteQuery
public String rewriteQuery(Query query)
- Specified by:
rewriteQuery in interface IQueryRewriter- Overrides:
rewriteQuery in class AbstractQueryRewriter
rewriteColumnType
public String rewriteColumnType(ColumnType columnType)
- Description copied from interface:
IQueryRewriter
- Rewrites the name of a column type, as it is written in CREATE TABLE
statements. Some databases dont support all column types, or have
different names for them. The implementation of this method will do that
conversion.
- Specified by:
rewriteColumnType in interface IQueryRewriter- Overrides:
rewriteColumnType in class AbstractQueryRewriter
- Returns:
rewriteFilterItem
public String rewriteFilterItem(FilterItem item)
- Specified by:
rewriteFilterItem in interface IQueryRewriter- Overrides:
rewriteFilterItem in class DefaultQueryRewriter
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.