Package org.h2.bnf.context

# Class DbContents

java.lang.Object
org.h2.bnf.context.DbContents

public class DbContents extends Object
Keeps meta data information about a database. This class is used by the H2 Console.

## Constructor Summary

Constructors
Constructor
Description
`DbContents()`

## Method Summary

Modifier and Type
Method
Description
`DbSchema`
`getDefaultSchema()`
`DbSchema[]`
`getSchemas()`
`boolean`
`isDB2()`
`boolean`
`isDerby()`
`boolean`
`isFirebird()`
`boolean`
`isH2()`
`boolean`
`isMSSQLServer()`
`boolean`
`isMySQL()`
`boolean`
`isOracle()`
`boolean`
`isPostgreSQL()`
`boolean`
`isSQLite()`
`boolean`
`mayHaveStandardViews()`
Returns whether standard INFORMATION_SCHEMA.VIEWS may be supported.
`String`
`quoteIdentifier(String identifier)`
Add double quotes around an identifier if required.
`void`
`readContents(String url, Connection conn)`
Read the contents of this database from the database meta data.
`void`
`setMayHaveStandardViews(boolean mayHaveStandardViews)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DbContents

public DbContents()

## Method Details

### getDefaultSchema

public DbSchema getDefaultSchema()

Returns:
  the default schema.

### isDerby

public boolean isDerby()

Returns:
  true if this is an Apache Derby database.

### isFirebird

public boolean isFirebird()

Returns:
  true if this is a Firebird database.

### isH2

public boolean isH2()

Returns:
  true if this is a H2 database.

### isMSSQLServer

public boolean isMSSQLServer()

Returns:
  true if this is a MS SQL Server database.

### isMySQL

public boolean isMySQL()

Returns:
  true if this is a MySQL database.

### isOracle

public boolean isOracle()

Returns:
  true if this is an Oracle database.

### isPostgreSQL

public boolean isPostgreSQL()

Returns:
  true if this is a PostgreSQL database.

### isSQLite

public boolean isSQLite()

Returns:
  true if this is an SQLite database.

### isDB2

public boolean isDB2()

Returns:
  true if this is an IBM DB2 database.

### getSchemas

public DbSchema[] getSchemas()

Returns:
  the list of schemas.

### mayHaveStandardViews

public boolean mayHaveStandardViews()
Returns whether standard INFORMATION_SCHEMA.VIEWS may be supported.

Returns:
  whether standard INFORMATION_SCHEMA.VIEWS may be supported

### setMayHaveStandardViews

public void setMayHaveStandardViews(boolean mayHaveStandardViews)

Parameters:
  `mayHaveStandardViews` - whether standard INFORMATION_SCHEMA.VIEWS is detected as supported

### readContents

public void readContents(String url, Connection conn) throws SQLException
Read the contents of this database from the database meta data.

Parameters:
  `url` - the database URL
  `conn` - the connection
Throws:
  `SQLException` - on failure

### quoteIdentifier

public String quoteIdentifier(String identifier)
Add double quotes around an identifier if required.

Parameters:
  `identifier` - the identifier
Returns:
  the quoted identifier