Class QuerySpaceTreePrinter


  • public class QuerySpaceTreePrinter
    extends java.lang.Object
    Prints a QuerySpaces graph as a tree structure.

    Intended for use in debugging, logging, etc.

    • Method Detail

      • asString

        public java.lang.String asString​(QuerySpaces spaces,
                                         AliasResolutionContext aliasResolutionContext)
        Returns a String containing the QuerySpaces graph as a tree structure.
        Parameters:
        spaces - The QuerySpaces object.
        aliasResolutionContext - The context for resolving table and column aliases for the QuerySpace references in spaces; if null, table and column aliases are not included in returned value..
        Returns:
        the String containing the QuerySpaces graph as a tree structure.
      • asString

        public java.lang.String asString​(QuerySpaces spaces,
                                         int depth,
                                         AliasResolutionContext aliasResolutionContext)
        Returns a String containing the QuerySpaces graph as a tree structure, starting at a particular depth. The value for depth indicates the number of indentations that will prefix all lines in the returned String. Root query spaces will be written with depth + 1 and the depth will be further incremented as joined query spaces are traversed. An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        aliasResolutionContext - The context for resolving table and column aliases for the QuerySpace references in spaces; if null, table and column aliases are not included in returned value..
        Returns:
        the String containing the QuerySpaces graph as a tree structure.
      • write

        public void write​(QuerySpaces spaces,
                          int depth,
                          AliasResolutionContext aliasResolutionContext,
                          java.io.PrintStream printStream)
        Returns a String containing the QuerySpaces graph as a tree structure, starting at a particular depth. The value for depth indicates the number of indentations that will prefix all lines in the returned String. Root query spaces will be written with depth + 1 and the depth will be further incremented as joined query spaces are traversed. An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        aliasResolutionContext - The context for resolving table and column aliases for the QuerySpace references in spaces; if null, table and column aliases are not included in returned value.
        printStream - The print stream for writing.
      • write

        public void write​(QuerySpaces spaces,
                          int depth,
                          AliasResolutionContext aliasResolutionContext,
                          java.io.PrintWriter printWriter)
        Returns a String containing the QuerySpaces graph as a tree structure, starting at a particular depth. The value for depth indicates the number of indentations that will prefix all lines in the returned String. Root query spaces will be written with depth + 1 and the depth will be further incremented as joined query spaces are traversed. An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        aliasResolutionContext - The context for resolving table and column aliases for the QuerySpace references in spaces; if null, table and column aliases are not included in returned value.
        printWriter - The print writer for writing.
      • extractDetails

        public java.lang.String extractDetails​(QuerySpace space)
        Returns a String containing high-level details about the QuerySpace, such as:
        Parameters:
        space - The query space
        Returns:
        a String containing details about the QuerySpace