Package org.h2.util

Interface HasSQL

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String getSQL​(int sqlFlags)
      Get the SQL statement of this expression.
      java.lang.StringBuilder getSQL​(java.lang.StringBuilder builder, int sqlFlags)
      Appends the SQL statement of this object to the specified builder.
      default java.lang.String getTraceSQL()
      Get a medium size SQL expression for debugging or tracing.
    • Field Detail

      • QUOTE_ONLY_WHEN_REQUIRED

        static final int QUOTE_ONLY_WHEN_REQUIRED
        Quote identifiers only when it is strictly required (different case or identifier is also a keyword).
        See Also:
        Constant Field Values
      • REPLACE_LOBS_FOR_TRACE

        static final int REPLACE_LOBS_FOR_TRACE
        Replace long LOB values with some generated values.
        See Also:
        Constant Field Values
      • ADD_PLAN_INFORMATION

        static final int ADD_PLAN_INFORMATION
        Add execution plan information.
        See Also:
        Constant Field Values
      • TRACE_SQL_FLAGS

        static final int TRACE_SQL_FLAGS
        Combined flags for trace.
        See Also:
        Constant Field Values
    • Method Detail

      • getTraceSQL

        default java.lang.String getTraceSQL()
        Get a medium size SQL expression for debugging or tracing.
        Returns:
        the SQL expression
      • getSQL

        default java.lang.String getSQL​(int sqlFlags)
        Get the SQL statement of this expression. This may not always be the original SQL statement, specially after optimization.
        Parameters:
        sqlFlags - formatting flags
        Returns:
        the SQL statement
      • getSQL

        java.lang.StringBuilder getSQL​(java.lang.StringBuilder builder,
                                       int sqlFlags)
        Appends the SQL statement of this object to the specified builder.
        Parameters:
        builder - string builder
        sqlFlags - formatting flags
        Returns:
        the specified string builder