Class HsqldbQueryRewriter

    • 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: 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 DefaultQueryRewriter
        Parameters:
        columnType - the (non-null) ColumnType to rewrite
        columnSize - 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: 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
        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: 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.
      • needsQuoting

        public boolean needsQuoting​(String alias,
                                    String identifierQuoteString)
        HSQL converts all non-escaped characters to uppercases, this is prevented by always escaping
        Overrides:
        needsQuoting in class DefaultQueryRewriter