Top Description Fields Constructors Methods
org.h2.bnf.context

public Class DbSchema

extends Object
Class Inheritance
Imports
java.sql.Connection, .DatabaseMetaData, .PreparedStatement, .ResultSet, .SQLException, .SQLSyntaxErrorException, java.util.ArrayList, org.h2.engine.SysProperties, org.h2.util.StringUtils, .Utils

Contains meta data information about a database schema. This class is used by the H2 Console.

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private final DbContents
contents

The database content container.

public final boolean
isDefault

True if this is the default schema for this database.

public final boolean
isSystem

True if this is a system schema (for example the INFORMATION_SCHEMA).

public final String
name

The schema name.

private DbProcedure[]
procedures

The procedures list.

public final String
quotedName

The quoted schema name.

private DbTableOrView[]
tables

The table list.

Constructor Summary

AccessConstructor and Description
pack-priv
DbSchema(DbContents contents, String name, boolean isDefault)

Method Summary

Modifier and TypeMethod and Description
public DbContents

Returns:

The database content container.
getContents
()

public DbProcedure[]

Returns:

The procedure list.
getProcedures
()

public DbTableOrView[]

Returns:

The table list.
getTables
()

private static PreparedStatement
public void
readProcedures(DatabaseMetaData
the database meta data
meta
)

Read all procedures in the database.

public void
readTables(DatabaseMetaData
the database meta data
meta
,
String[]
the table types to read
tableTypes
)

Read all tables for this schema from the database meta data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COLUMNS_QUERY_H2_197back to summary
private static final String COLUMNS_QUERY_H2_197
COLUMNS_QUERY_H2_202back to summary
private static final String COLUMNS_QUERY_H2_202
contentsback to summary
private final DbContents contents

The database content container.

isDefaultback to summary
public final boolean isDefault

True if this is the default schema for this database.

isSystemback to summary
public final boolean isSystem

True if this is a system schema (for example the INFORMATION_SCHEMA).

nameback to summary
public final String name

The schema name.

proceduresback to summary
private DbProcedure[] procedures

The procedures list.

quotedNameback to summary
public final String quotedName

The quoted schema name.

tablesback to summary
private DbTableOrView[] tables

The table list.

Constructor Detail

DbSchemaback to summary
pack-priv DbSchema(DbContents contents, String name, boolean isDefault)

Method Detail

getContentsback to summary
public DbContents getContents()
Returns:DbContents

The database content container.

getProceduresback to summary
public DbProcedure[] getProcedures()
Returns:DbProcedure[]

The procedure list.

getTablesback to summary
public DbTableOrView[] getTables()
Returns:DbTableOrView[]

The table list.

prepareColumnsQueryH2back to summary
private static PreparedStatement prepareColumnsQueryH2(Connection connection) throws SQLException
readProceduresback to summary
public void readProcedures(DatabaseMetaData meta) throws SQLException

Read all procedures in the database.

Parameters
meta:DatabaseMetaData

the database meta data

Exceptions
SQLException:
Error while fetching procedures
readTablesback to summary
public void readTables(DatabaseMetaData meta, String[] tableTypes) throws SQLException

Read all tables for this schema from the database meta data.

Parameters
meta:DatabaseMetaData

the database meta data

tableTypes:String[]

the table types to read

Exceptions
SQLException:
on failure