Package org.apache.ignite.sql
Interface ColumnMetadata
public interface ColumnMetadata
Interface that provides methods for accessing column metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Represents a column origin. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Undefined precision value.static final int
Undefined scale value. -
Method Summary
Modifier and TypeMethodDescriptionname()
Returns a column name in the result set.boolean
nullable()
Returns a row column nullability flag.@Nullable ColumnMetadata.ColumnOrigin
origin()
Returns a column origin.int
Returns an SQL column precision or-1
if precision is not applicable to the column's type.int
scale()
Returns an SQL column scale or-1
if scale is not applicable to the column's type.type()
Returns an SQL column type.Class<?>
Returns a class of column values.
-
Field Details
-
UNDEFINED_PRECISION
static final int UNDEFINED_PRECISIONUndefined precision value.- See Also:
-
UNDEFINED_SCALE
static final int UNDEFINED_SCALEUndefined 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
Returns a column origin.- Returns:
- Column origin or
null
if not applicable.
-