public enum OverflowStrategy extends Enum<OverflowStrategy>
Overflows can happen in the following situations:
tinyint (max value of 127) results in overflow.
int results in overflow.
double results in overflow, because there are too
many significant digits to fit in a 64-bit double.
| Enum Constant and Description |
|---|
REJECT
Overflows are considered errors and the data is rejected.
|
TRUNCATE
The data is truncated to fit in the target CQL type.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Number |
apply(Number value,
ArithmeticException e,
Class<? extends Number> targetClass,
RoundingMode roundingMode) |
static OverflowStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OverflowStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OverflowStrategy REJECT
public static final OverflowStrategy TRUNCATE
public static OverflowStrategy[] values()
for (OverflowStrategy c : OverflowStrategy.values()) System.out.println(c);
public static OverflowStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract Number apply(Number value, ArithmeticException e, Class<? extends Number> targetClass, RoundingMode roundingMode)
Copyright © 2017–2021 DataStax. All rights reserved.