Class DbTableOrView


  • public class DbTableOrView
    extends java.lang.Object
    Contains meta data information about a table or a view. This class is used by the H2 Console.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private DbColumn[] columns
      The column list.
      private boolean isView
      True if this represents a view.
      private java.lang.String name
      The table name.
      private java.lang.String quotedName
      The quoted table name.
      private DbSchema schema
      The schema this table belongs to.
    • Constructor Summary

      Constructors 
      Constructor Description
      DbTableOrView​(DbSchema schema, java.sql.ResultSet rs)  
    • Field Detail

      • schema

        private final DbSchema schema
        The schema this table belongs to.
      • name

        private final java.lang.String name
        The table name.
      • quotedName

        private final java.lang.String quotedName
        The quoted table name.
      • isView

        private final boolean isView
        True if this represents a view.
      • columns

        private DbColumn[] columns
        The column list.
    • Constructor Detail

      • DbTableOrView

        public DbTableOrView​(DbSchema schema,
                             java.sql.ResultSet rs)
                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
    • Method Detail

      • getSchema

        public DbSchema getSchema()
        Returns:
        The schema this table belongs to.
      • getColumns

        public DbColumn[] getColumns()
        Returns:
        The column list.
      • getName

        public java.lang.String getName()
        Returns:
        The table name.
      • isView

        public boolean isView()
        Returns:
        True if this represents a view.
      • getQuotedName

        public java.lang.String getQuotedName()
        Returns:
        The quoted table name.
      • readColumns

        public void readColumns​(java.sql.DatabaseMetaData meta,
                                java.sql.PreparedStatement ps)
                         throws java.sql.SQLException
        Read the column for this table from the database meta data.
        Parameters:
        meta - the database meta data
        ps - prepared statement with custom query for H2 database, null for others
        Throws:
        java.sql.SQLException - on failure