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

public Class DbTableOrView

extends Object
Class Inheritance
Imports
java.sql.DatabaseMetaData, .PreparedStatement, .ResultSet, .SQLException, java.util.ArrayList

Contains meta data information about a table or a view. This class is used by the H2 Console.

Field Summary

Modifier and TypeField and Description
private DbColumn[]
columns

The column list.

private final boolean
isView

True if this represents a view.

private final String
name

The table name.

private final String
quotedName

The quoted table name.

private final DbSchema
schema

The schema this table belongs to.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DbColumn[]

Returns:

The column list.
getColumns
()

public String

Returns:

The table name.
getName
()

public String

Returns:

The quoted table name.
getQuotedName
()

public DbSchema

Returns:

The schema this table belongs to.
getSchema
()

public boolean

Returns:

True if this represents a view.
isView
()

public void
readColumns(DatabaseMetaData
the database meta data
meta
,
PreparedStatement
prepared statement with custom query for H2 database, null for others
ps
)

Read the column for this table from the database meta data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnsback to summary
private DbColumn[] columns

The column list.

isViewback to summary
private final boolean isView

True if this represents a view.

nameback to summary
private final String name

The table name.

quotedNameback to summary
private final String quotedName

The quoted table name.

schemaback to summary
private final DbSchema schema

The schema this table belongs to.

Constructor Detail

DbTableOrViewback to summary
public DbTableOrView(DbSchema schema, ResultSet rs) throws SQLException

Method Detail

getColumnsback to summary
public DbColumn[] getColumns()
Returns:DbColumn[]

The column list.

getNameback to summary
public String getName()
Returns:String

The table name.

getQuotedNameback to summary
public String getQuotedName()
Returns:String

The quoted table name.

getSchemaback to summary
public DbSchema getSchema()
Returns:DbSchema

The schema this table belongs to.

isViewback to summary
public boolean isView()
Returns:boolean

True if this represents a view.

readColumnsback to summary
public void readColumns(DatabaseMetaData meta, PreparedStatement ps) throws SQLException

Read the column for this table from the database meta data.

Parameters
meta:DatabaseMetaData

the database meta data

ps:PreparedStatement

prepared statement with custom query for H2 database, null for others

Exceptions
SQLException:
on failure