Package org.h2.bnf.context
Class DbColumn
- java.lang.Object
-
- org.h2.bnf.context.DbColumn
-
public class DbColumn extends java.lang.Object
Keeps the meta data information of a column. This class is used by the H2 Console.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
dataType
private java.lang.String
name
private int
position
private java.lang.String
quotedName
-
Constructor Summary
Constructors Modifier Constructor Description private
DbColumn(DbContents contents, java.sql.ResultSet rs, boolean procedureColumn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DbColumn
getColumn(DbContents contents, java.sql.ResultSet rs)
Create a column from a DatabaseMetaData.getColumns row.java.lang.String
getDataType()
java.lang.String
getName()
int
getPosition()
static DbColumn
getProcedureColumn(DbContents contents, java.sql.ResultSet rs)
Create a column from a DatabaseMetaData.getProcedureColumns row.java.lang.String
getQuotedName()
-
-
-
Constructor Detail
-
DbColumn
private DbColumn(DbContents contents, java.sql.ResultSet rs, boolean procedureColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
getProcedureColumn
public static DbColumn getProcedureColumn(DbContents contents, java.sql.ResultSet rs) throws java.sql.SQLException
Create a column from a DatabaseMetaData.getProcedureColumns row.- Parameters:
contents
- the database contentsrs
- the result set- Returns:
- the column
- Throws:
java.sql.SQLException
- on failure
-
getColumn
public static DbColumn getColumn(DbContents contents, java.sql.ResultSet rs) throws java.sql.SQLException
Create a column from a DatabaseMetaData.getColumns row.- Parameters:
contents
- the database contentsrs
- the result set- Returns:
- the column
- Throws:
java.sql.SQLException
- on failure
-
getDataType
public java.lang.String getDataType()
- Returns:
- The data type name (including precision and the NOT NULL flag if applicable).
-
getName
public java.lang.String getName()
- Returns:
- The column name.
-
getQuotedName
public java.lang.String getQuotedName()
- Returns:
- The quoted table name.
-
getPosition
public int getPosition()
- Returns:
- Column index
-
-