public class TypeMetadata
extends java.lang.Object
DatabaseMetaData
.Modifier and Type | Class and Description |
---|---|
static class |
TypeMetadata.Builder |
static class |
TypeMetadata.TypeBehaviour |
Modifier and Type | Method and Description |
---|---|
static TypeMetadata.Builder |
builder(FirebirdSupportInfo supportInfo)
Creates type metadata builder.
|
java.lang.Integer |
getCharOctetLength() |
java.lang.Integer |
getColumnSize()
Returns the column size (precision) of the type.
|
static int |
getDataType(int sqlType,
int sqlSubType,
int sqlScale,
int characterSetId)
Derives the JDBC data type from
Types or JaybirdTypeCodes from metadata information. |
static java.lang.String |
getDataTypeName(int sqlType,
int sqlSubType,
int sqlScale)
Derives the JDBC/SQL type name from metadata information.
|
int |
getJdbcType() |
java.lang.Integer |
getLength() |
int |
getRadix() |
java.lang.Integer |
getScale()
Returns the scale of the field.
|
java.lang.String |
getSqlTypeName() |
public int getJdbcType()
Types
or JaybirdTypeCodes
code for this datatypepublic java.lang.String getSqlTypeName()
"NULL"
if the type is unknownpublic java.lang.Integer getColumnSize()
The value returned follows the definition used in DatabaseMetaData
, as established in
DatabaseMetaData.getColumns(String, String, String, String)
for COLUMN_SIZE
. The same
definition is used for database metadata columns PRECISION
in, among others,
DatabaseMetaData.getFunctionColumns(String, String, String, String)
.
This method will also return any non-zero precision information stored for other datatypes than those listed in
the COLUMN_SIZE
definition in the JDBC API.
DatabaseMetaData
, or null
.public java.lang.Integer getLength()
public java.lang.Integer getScale()
For numerical types, returns a zero or positive scale. For types without scale, it returns null
,
for types that have a non-zero scale in the Firebird metadata, it returns the scale as stored.
null
.public int getRadix()
2
or 10
; returns 10
for non-numerical,
non-boolean types.public java.lang.Integer getCharOctetLength()
null
otherwisepublic static TypeMetadata.Builder builder(FirebirdSupportInfo supportInfo)
supportInfo
- Firebird support infopublic static int getDataType(int sqlType, int sqlSubType, int sqlScale, int characterSetId)
Types
or JaybirdTypeCodes
from metadata information.sqlType
- Firebird type code as used in the metadata tablessqlSubType
- Firebird sub-type code as used in the metadata tablessqlScale
- Firebird scale as used in the metadata tablescharacterSetId
- Character set id as used in the metadata tablespublic static java.lang.String getDataTypeName(int sqlType, int sqlSubType, int sqlScale)
sqlType
- Firebird type code as used in the metadata tablessqlSubType
- Firebird sub-type code as used in the metadata tablessqlScale
- Firebird scale as used in the metadata tablesCopyright © 2001-2022 Jaybird (Firebird JDBC/JCA) team. All rights reserved.