Class PostgresAdapter

    • Constructor Detail

      • PostgresAdapter

        protected PostgresAdapter()
        Empty constructor.
    • Method Detail

      • toUpperCase

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

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

        public void generateLimits​(Query query,
                                   long offset,
                                   int limit)
        Generate a LIMIT limit OFFSET offset clause if offset > 0 or an LIMIT limit clause if limit is > 0 and offset is 0.
        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
      • useIlike

        public boolean useIlike()
        Whether ILIKE should be used for case insensitive like clauses. As postgres uses ILIKE, this mimplementation returns true.
        Specified by:
        useIlike in interface Adapter
        Overrides:
        useIlike in class AbstractAdapter
        Returns:
        true if ilike should be used for case insensitive likes, false if ignoreCase should be applied to the compared strings.