use of org.apache.ignite.internal.schema.Column in project ignite-3 by apache.
the class UpgradingRowAdapter method bitmaskValue.
/**
* {@inheritDoc}
*/
@Override
public BitSet bitmaskValue(int colIdx) throws InvalidTypeException {
int mappedId = mapColumn(colIdx);
Column column = mappedId < 0 ? mapper.mappedColumn(colIdx) : super.schema().column(mappedId);
if (NativeTypeSpec.BITMASK != column.type().spec()) {
throw new SchemaException("Type conversion is not supported yet.");
}
return mappedId < 0 ? (BitSet) column.defaultValue() : super.bitmaskValue(mappedId);
}
use of org.apache.ignite.internal.schema.Column in project ignite-3 by apache.
the class UpgradingRowAdapter method dateTimeValue.
/**
* {@inheritDoc}
*/
@Override
public LocalDateTime dateTimeValue(int colIdx) throws InvalidTypeException {
int mappedId = mapColumn(colIdx);
Column column = mappedId < 0 ? mapper.mappedColumn(colIdx) : super.schema().column(mappedId);
if (NativeTypeSpec.DATETIME != column.type().spec()) {
throw new SchemaException("Type conversion is not supported yet.");
}
return mappedId < 0 ? (LocalDateTime) column.defaultValue() : super.dateTimeValue(mappedId);
}
use of org.apache.ignite.internal.schema.Column in project ignite-3 by apache.
the class UpgradingRowAdapter method longValue.
/**
* {@inheritDoc}
*/
@Override
public long longValue(int colIdx) throws InvalidTypeException {
int mappedId = mapColumn(colIdx);
Column column = mappedId < 0 ? mapper.mappedColumn(colIdx) : super.schema().column(mappedId);
if (NativeTypeSpec.INT64 != column.type().spec()) {
throw new SchemaException("Type conversion is not supported yet.");
}
return mappedId < 0 ? (long) column.defaultValue() : super.longValue(mappedId);
}
use of org.apache.ignite.internal.schema.Column in project ignite-3 by apache.
the class UpgradingRowAdapter method intValue.
/**
* {@inheritDoc}
*/
@Override
public int intValue(int colIdx) throws InvalidTypeException {
int mappedId = mapColumn(colIdx);
Column column = mappedId < 0 ? mapper.mappedColumn(colIdx) : super.schema().column(mappedId);
if (NativeTypeSpec.INT32 != column.type().spec()) {
throw new SchemaException("Type conversion is not supported yet.");
}
return mappedId < 0 ? (int) column.defaultValue() : super.intValue(mappedId);
}
use of org.apache.ignite.internal.schema.Column in project ignite-3 by apache.
the class UpgradingRowAdapter method decimalValue.
/**
* {@inheritDoc}
*/
@Override
public BigDecimal decimalValue(int colIdx) throws InvalidTypeException {
int mappedId = mapColumn(colIdx);
Column column = mappedId < 0 ? mapper.mappedColumn(colIdx) : super.schema().column(mappedId);
if (NativeTypeSpec.DECIMAL != column.type().spec()) {
throw new SchemaException("Type conversion is not supported yet.");
}
return mappedId < 0 ? (BigDecimal) column.defaultValue() : super.decimalValue(mappedId);
}
Aggregations