Class DerbyAdapter

    • Constructor Detail

      • DerbyAdapter

        protected DerbyAdapter()
        Empty constructor.
    • Method Detail

      • toUpperCase

        public String toUpperCase​(String str)
        This method is used to ignore case.
        Specified by:
        toUpperCase in interface Adapter
        Specified by:
        toUpperCase in class AbstractAdapter
        Parameters:
        str - The string to transform to upper case.
        Returns:
        The upper case string.
      • ignoreCase

        public String ignoreCase​(String str)
        This method is used to ignore case.
        Specified by:
        ignoreCase in interface Adapter
        Specified by:
        ignoreCase in class AbstractAdapter
        Parameters:
        str - The string whose case to ignore.
        Returns:
        The string in a case that can be ignored.
      • escapeText

        public boolean escapeText()
        Whether backslashes (\) should be escaped in explicit SQL strings. If true is returned, a BACKSLASH will be changed to "\\". If false is returned, a BACKSLASH will be left as "\". As derby does not need escaping of Backslashes, this method always returns false.
        Specified by:
        escapeText in interface Adapter
        Overrides:
        escapeText in class AbstractAdapter
        Returns:
        true if the database needs to escape backslashes in SqlExpressions.
      • useEscapeClauseForLike

        public boolean useEscapeClauseForLike()
        Whether an escape clause in like should be used. Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\'; Derby needs this, so this implementation always returns true.
        Specified by:
        useEscapeClauseForLike in interface Adapter
        Overrides:
        useEscapeClauseForLike in class AbstractAdapter
        Returns:
        whether the escape clause should be appended or not.
      • generateLimits

        public void generateLimits​(Query query,
                                   long offset,
                                   int limit)
        Build Derby-style query with limit or offset. The resulting query may look like this:
          select * from TABLENAME fetch next 3 rows only;
          select * from TABLENAME offset 3 rows fetch next 3 rows only;
         
        Specified by:
        generateLimits in interface Adapter
        Overrides:
        generateLimits in class AbstractAdapter
        Parameters:
        query - The query to modify.
        offset - the offset value.
        limit - the limit value.