Interface ColumnMetadata


public interface ColumnMetadata
Interface that provides methods for accessing column metadata.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents a column origin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Undefined precision value.
    static final int
    Undefined scale value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a column name in the result set.
    boolean
    Returns a row column nullability flag.
    Returns a column origin.
    int
    Returns an SQL column precision or -1 if precision is not applicable to the column's type.
    int
    Returns an SQL column scale or -1 if scale is not applicable to the column's type.
    Returns an SQL column type.
    Returns a class of column values.
  • Field Details

    • UNDEFINED_PRECISION

      static final int UNDEFINED_PRECISION
      Undefined precision value.
      See Also:
    • UNDEFINED_SCALE

      static final int UNDEFINED_SCALE
      Undefined scale value.
      See Also:
  • Method Details

    • name

      String name()
      Returns a column name in the result set.

      Note: If a row column does not represent any table column, a generated name is used.

      Returns:
      Column name.
    • valueClass

      Class<?> valueClass()
      Returns a class of column values.
      Returns:
      Value class.
    • type

      ColumnType type()
      Returns an SQL column type.
      Returns:
      Value type.
    • precision

      int precision()
      Returns an SQL column precision or -1 if precision is not applicable to the column's type.
      Returns:
      Number of decimal digits for exact numeric types; number of decimal digits in mantissa for approximate numeric types; number of decimal digits for fractional seconds of datetime types; length in characters for character types; length in bytes for binary types; length in bits for bit types; 1 for BOOLEAN; -1 if precision is not valid for the type.
    • scale

      int scale()
      Returns an SQL column scale or -1 if scale is not applicable to the column's type.
      Returns:
      Number of digits of scale.
    • nullable

      boolean nullable()
      Returns a row column nullability flag.
      Returns:
      true if column is nullable, false otherwise.
    • origin

      @Nullable @Nullable ColumnMetadata.ColumnOrigin origin()
      Returns a column origin.
      Returns:
      Column origin or null if not applicable.