Class HsqldbQueryRewriter
- java.lang.Object
-
- org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
-
- org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
-
- org.apache.metamodel.jdbc.dialects.HsqldbQueryRewriter
-
- All Implemented Interfaces:
IQueryRewriter
public class HsqldbQueryRewriter extends DefaultQueryRewriter
Query rewriter for HSQLDB
-
-
Constructor Summary
Constructors Constructor Description HsqldbQueryRewriter(JdbcDataContext dataContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFirstRowSupported(org.apache.metamodel.query.Query query)Gets whether this query rewriter is able to write the "First row" query property to the query string.booleanisMaxRowsSupported()Gets whether this query rewriter is able to write the "Max rows" query property to the query string.booleanneedsQuoting(String alias, String identifierQuoteString)HSQL converts all non-escaped characters to uppercases, this is prevented by always escapingStringrewriteColumnType(org.apache.metamodel.schema.ColumnType columnType, Integer columnSize)Rewrites the name of a column type, as it is written in CREATE TABLE statements.StringrewriteFilterItem(org.apache.metamodel.query.FilterItem item)protected StringrewriteSelectClause(org.apache.metamodel.query.Query query, org.apache.metamodel.query.SelectClause selectClause)-
Methods inherited from class org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
beforeRewrite, escapeQuotes, isAggregateFunctionSupported, isPrimaryKeySupported, isScalarFunctionSupported, rewriteFilterItemWithOperandLiteral, rewriteTimestamp
-
Methods inherited from class org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
getColumnType, getDataContext, getResultSetValue, isSchemaIncludedInColumnPaths, isSupportedVersion, isTransactional, rewriteColumnTypeInternal, rewriteFromClause, rewriteFromItem, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteQuery, rewriteSelectItem, rewriteWhereClause, setStatementParameter, toTime, toTimestamp
-
-
-
-
Constructor Detail
-
HsqldbQueryRewriter
public HsqldbQueryRewriter(JdbcDataContext dataContext)
-
-
Method Detail
-
rewriteColumnType
public String rewriteColumnType(org.apache.metamodel.schema.ColumnType columnType, Integer columnSize)
Description copied from interface:IQueryRewriterRewrites 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:
rewriteColumnTypein interfaceIQueryRewriter- Overrides:
rewriteColumnTypein classDefaultQueryRewriter- Parameters:
columnType- the (non-null)ColumnTypeto rewritecolumnSize- the (possibly null) column size that may or may not have been specified- Returns:
-
isFirstRowSupported
public boolean isFirstRowSupported(org.apache.metamodel.query.Query query)
Description copied from interface:IQueryRewriterGets whether this query rewriter is able to write the "First row" query property to the query string.- Specified by:
isFirstRowSupportedin interfaceIQueryRewriter- Overrides:
isFirstRowSupportedin classDefaultQueryRewriter- Parameters:
query- For some database engines, the content of the query decides the ability to change first row- Returns:
- whether this query rewriter is able to write the "First row" query property to the query string.
-
isMaxRowsSupported
public boolean isMaxRowsSupported()
Description copied from interface:IQueryRewriterGets whether this query rewriter is able to write the "Max rows" query property to the query string.- Specified by:
isMaxRowsSupportedin interfaceIQueryRewriter- Overrides:
isMaxRowsSupportedin classDefaultQueryRewriter- Returns:
- whether this query rewriter is able to write the "Max rows" query property to the query string.
-
rewriteSelectClause
protected String rewriteSelectClause(org.apache.metamodel.query.Query query, org.apache.metamodel.query.SelectClause selectClause)
- Overrides:
rewriteSelectClausein classAbstractQueryRewriter
-
rewriteFilterItem
public String rewriteFilterItem(org.apache.metamodel.query.FilterItem item)
- Specified by:
rewriteFilterItemin interfaceIQueryRewriter- Overrides:
rewriteFilterItemin classDefaultQueryRewriter
-
needsQuoting
public boolean needsQuoting(String alias, String identifierQuoteString)
HSQL converts all non-escaped characters to uppercases, this is prevented by always escaping- Overrides:
needsQuotingin classDefaultQueryRewriter
-
-