Package org.h2.table

Class DerivedTable

    • Constructor Detail

      • DerivedTable

        public DerivedTable​(SessionLocal session,
                            java.lang.String name,
                            Column[] columnTemplates,
                            Query query,
                            Query topQuery)
        Create a derived table out of the given query.
        Parameters:
        session - the session
        name - the view name
        columnTemplates - column templates, or null
        query - the initialized query
        topQuery - the top level query
    • Method Detail

      • isQueryComparable

        public boolean isQueryComparable()
        Description copied from class: Table
        Check whether the table (or view) contains no columns that prevent index conditions to be used. For example, a view that contains the ROWNUM() pseudo-column prevents this.
        Overrides:
        isQueryComparable in class QueryExpressionTable
        Returns:
        true if the table contains no query-comparable column
      • canDrop

        public boolean canDrop()
        Description copied from class: Table
        Check if this table can be dropped.
        Specified by:
        canDrop in class Table
        Returns:
        true if it can
      • getTableType

        public TableType getTableType()
        Description copied from class: Table
        Get the table type name
        Specified by:
        getTableType in class Table
        Returns:
        the table type name
      • getCreateSQL

        public java.lang.String getCreateSQL()
        Description copied from class: DbObject
        Construct the CREATE ... SQL statement for this object.
        Specified by:
        getCreateSQL in class DbObject
        Returns:
        the SQL statement
      • getSQL

        public java.lang.StringBuilder getSQL​(java.lang.StringBuilder builder,
                                              int sqlFlags)
        Description copied from interface: HasSQL
        Appends the SQL statement of this object to the specified builder.
        Specified by:
        getSQL in interface HasSQL
        Overrides:
        getSQL in class SchemaObject
        Parameters:
        builder - string builder
        sqlFlags - formatting flags
        Returns:
        the specified string builder