Class DbSchema


  • public class DbSchema
    extends java.lang.Object
    Contains meta data information about a database schema. This class is used by the H2 Console.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean isDefault
      True if this is the default schema for this database.
      boolean isSystem
      True if this is a system schema (for example the INFORMATION_SCHEMA).
      java.lang.String name
      The schema name.
      java.lang.String quotedName
      The quoted schema name.
    • Field Detail

      • name

        public final java.lang.String name
        The schema name.
      • isDefault

        public final boolean isDefault
        True if this is the default schema for this database.
      • isSystem

        public final boolean isSystem
        True if this is a system schema (for example the INFORMATION_SCHEMA).
      • quotedName

        public final java.lang.String quotedName
        The quoted schema name.
    • Method Detail

      • getContents

        public DbContents getContents()
        Returns:
        The database content container.
      • getTables

        public DbTableOrView[] getTables()
        Returns:
        The table list.
      • getProcedures

        public DbProcedure[] getProcedures()
        Returns:
        The procedure list.
      • readTables

        public void readTables​(java.sql.DatabaseMetaData meta,
                               java.lang.String[] tableTypes)
                        throws java.sql.SQLException
        Read all tables for this schema from the database meta data.
        Parameters:
        meta - the database meta data
        tableTypes - the table types to read
        Throws:
        java.sql.SQLException - on failure
      • readProcedures

        public void readProcedures​(java.sql.DatabaseMetaData meta)
                            throws java.sql.SQLException
        Read all procedures in the database.
        Parameters:
        meta - the database meta data
        Throws:
        java.sql.SQLException - Error while fetching procedures