Class QueryBuilder

    • Constructor Detail

      • QueryBuilder

        public QueryBuilder()
    • Method Detail

      • canHandle

        public boolean canHandle​(String language)
        Returns true if this query tree builder can handle a statement in language.
        Specified by:
        canHandle in interface QueryTreeBuilder
        Parameters:
        language - the language of a query statement to build a query tree.
        Returns:
        true if this builder can handle language; false otherwise.
      • getSupportedLanguages

        public String[] getSupportedLanguages()
        This builder supports Query.SQL. Returns the set of query languages supported by this builder.
        Specified by:
        getSupportedLanguages in interface QueryTreeBuilder
        Returns:
        String array containing the names of the supported languages.
      • toString

        public String toString​(QueryRootNode root,
                               NameResolver resolver)
                        throws InvalidQueryException
        Creates a String representation of the query node tree in the syntax this QueryTreeBuilder can handle.
        Specified by:
        toString in interface QueryTreeBuilder
        Parameters:
        root - the root of the query node tree.
        resolver - to resolve Names.
        Returns:
        a String representation of the query node tree.
        Throws:
        InvalidQueryException - if the query node tree cannot be converted into a String representation due to restrictions in this syntax.