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

public Class DbColumn

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

Keeps the meta data information of a column. This class is used by the H2 Console.

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final int
private final String

Constructor Summary

AccessConstructor and Description
private
DbColumn(DbContents contents, ResultSet rs, boolean procedureColumn)

Method Summary

Modifier and TypeMethod and Description
public static DbColumn

Returns:

the column
getColumn
(DbContents
the database contents
contents
,
ResultSet
the result set
rs
)

Create a column from a DatabaseMetaData.getColumns row.

public String

Returns:

The data type name (including precision and the NOT NULL flag if applicable).
getDataType
()

public String

Returns:

The column name.
getName
()

public int

Returns:

Column index
getPosition
()

public static DbColumn

Returns:

the column
getProcedureColumn
(DbContents
the database contents
contents
,
ResultSet
the result set
rs
)

Create a column from a DatabaseMetaData.getProcedureColumns row.

public String

Returns:

The quoted table name.
getQuotedName
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dataTypeback to summary
private final String dataType
nameback to summary
private final String name
positionback to summary
private final int position
quotedNameback to summary
private final String quotedName

Constructor Detail

DbColumnback to summary
private DbColumn(DbContents contents, ResultSet rs, boolean procedureColumn) throws SQLException

Method Detail

getColumnback to summary
public static DbColumn getColumn(DbContents contents, ResultSet rs) throws SQLException

Create a column from a DatabaseMetaData.getColumns row.

Parameters
contents:DbContents

the database contents

rs:ResultSet

the result set

Returns:DbColumn

the column

Exceptions
SQLException:
on failure
getDataTypeback to summary
public String getDataType()
Returns:String

The data type name (including precision and the NOT NULL flag if applicable).

getNameback to summary
public String getName()
Returns:String

The column name.

getPositionback to summary
public int getPosition()
Returns:int

Column index

getProcedureColumnback to summary
public static DbColumn getProcedureColumn(DbContents contents, ResultSet rs) throws SQLException

Create a column from a DatabaseMetaData.getProcedureColumns row.

Parameters
contents:DbContents

the database contents

rs:ResultSet

the result set

Returns:DbColumn

the column

Exceptions
SQLException:
on failure
getQuotedNameback to summary
public String getQuotedName()
Returns:String

The quoted table name.