java.lang.Object
java.lang.Record
org.itsallcode.jdbc.metadata.ColumnMetaData
- Record Components:
tableCatalog- table catalog (may benull)tableSchema- table schema (may benull)tableName- table namecolumnName- column namedataType- SQL typetypeName- Data source dependent type name, for a UDT the type name is fully qualifiedcolumnSize- column size.decimalDigits- the number of fractional digits.nullis returned for data types where DECIMAL_DIGITS is not applicable.numPrecisionRadix- Radix (typically either 10 or 2)nullable- isNULLallowed.remarks- comment describing column (may benull)columnDef- default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may benull)charOctetLength- for char types the maximum number of bytes in the columnordinalPosition- index of column in table (starting at 1)isNullable- ISO rules are used to determine the nullability for a column.scopeCatalog- catalog of table that is the scope of a reference attribute (nullif DATA_TYPE isn't REF)scopeSchema- schema of table that is the scope of a reference attribute (nullif the DATA_TYPE isn't REF)scopeTable- table name that this the scope of a reference attribute (nullif the DATA_TYPE isn't REF)sourceDataType- source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (nullif DATA_TYPE isn't DISTINCT or user-generated REF)isAutoIncrement- Indicates whether this column is auto incrementedisGeneratedColumn- Indicates whether this is a generated column
public record ColumnMetaData(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn)
extends Record
Description of a column.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicates whether a column is auto incremented.static enumIndicates whether this is a generated column.static enumColumn ISO nullability.static enumColumn nullability. -
Constructor Summary
ConstructorsConstructorDescriptionColumnMetaData(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn) Creates an instance of aColumnMetaDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecharOctetLengthrecord component.Returns the value of thecolumnDefrecord component.Returns the value of thecolumnNamerecord component.intReturns the value of thecolumnSizerecord component.dataType()Returns the value of thedataTyperecord component.intReturns the value of thedecimalDigitsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theisAutoIncrementrecord component.Returns the value of theisGeneratedColumnrecord component.Returns the value of theisNullablerecord component.nullable()Returns the value of thenullablerecord component.intReturns the value of thenumPrecisionRadixrecord component.intReturns the value of theordinalPositionrecord component.remarks()Returns the value of theremarksrecord component.Returns the value of thescopeCatalogrecord component.Returns the value of thescopeSchemarecord component.Returns the value of thescopeTablerecord component.shortReturns the value of thesourceDataTyperecord component.Returns the value of thetableCatalogrecord component.Returns the value of thetableNamerecord component.Returns the value of thetableSchemarecord component.final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.
-
Constructor Details
-
ColumnMetaData
public ColumnMetaData(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn) Creates an instance of aColumnMetaDatarecord class.- Parameters:
tableCatalog- the value for thetableCatalogrecord componenttableSchema- the value for thetableSchemarecord componenttableName- the value for thetableNamerecord componentcolumnName- the value for thecolumnNamerecord componentdataType- the value for thedataTyperecord componenttypeName- the value for thetypeNamerecord componentcolumnSize- the value for thecolumnSizerecord componentdecimalDigits- the value for thedecimalDigitsrecord componentnumPrecisionRadix- the value for thenumPrecisionRadixrecord componentnullable- the value for thenullablerecord componentremarks- the value for theremarksrecord componentcolumnDef- the value for thecolumnDefrecord componentcharOctetLength- the value for thecharOctetLengthrecord componentordinalPosition- the value for theordinalPositionrecord componentisNullable- the value for theisNullablerecord componentscopeCatalog- the value for thescopeCatalogrecord componentscopeSchema- the value for thescopeSchemarecord componentscopeTable- the value for thescopeTablerecord componentsourceDataType- the value for thesourceDataTyperecord componentisAutoIncrement- the value for theisAutoIncrementrecord componentisGeneratedColumn- the value for theisGeneratedColumnrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tableCatalog
Returns the value of thetableCatalogrecord component.- Returns:
- the value of the
tableCatalogrecord component
-
tableSchema
Returns the value of thetableSchemarecord component.- Returns:
- the value of the
tableSchemarecord component
-
tableName
Returns the value of thetableNamerecord component.- Returns:
- the value of the
tableNamerecord component
-
columnName
Returns the value of thecolumnNamerecord component.- Returns:
- the value of the
columnNamerecord component
-
dataType
Returns the value of thedataTyperecord component.- Returns:
- the value of the
dataTyperecord component
-
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
columnSize
Returns the value of thecolumnSizerecord component.- Returns:
- the value of the
columnSizerecord component
-
decimalDigits
Returns the value of thedecimalDigitsrecord component.- Returns:
- the value of the
decimalDigitsrecord component
-
numPrecisionRadix
Returns the value of thenumPrecisionRadixrecord component.- Returns:
- the value of the
numPrecisionRadixrecord component
-
nullable
Returns the value of thenullablerecord component.- Returns:
- the value of the
nullablerecord component
-
remarks
Returns the value of theremarksrecord component.- Returns:
- the value of the
remarksrecord component
-
columnDef
Returns the value of thecolumnDefrecord component.- Returns:
- the value of the
columnDefrecord component
-
charOctetLength
Returns the value of thecharOctetLengthrecord component.- Returns:
- the value of the
charOctetLengthrecord component
-
ordinalPosition
Returns the value of theordinalPositionrecord component.- Returns:
- the value of the
ordinalPositionrecord component
-
isNullable
Returns the value of theisNullablerecord component.- Returns:
- the value of the
isNullablerecord component
-
scopeCatalog
Returns the value of thescopeCatalogrecord component.- Returns:
- the value of the
scopeCatalogrecord component
-
scopeSchema
Returns the value of thescopeSchemarecord component.- Returns:
- the value of the
scopeSchemarecord component
-
scopeTable
Returns the value of thescopeTablerecord component.- Returns:
- the value of the
scopeTablerecord component
-
sourceDataType
Returns the value of thesourceDataTyperecord component.- Returns:
- the value of the
sourceDataTyperecord component
-
isAutoIncrement
Returns the value of theisAutoIncrementrecord component.- Returns:
- the value of the
isAutoIncrementrecord component
-
isGeneratedColumn
Returns the value of theisGeneratedColumnrecord component.- Returns:
- the value of the
isGeneratedColumnrecord component
-