Package com.clickhouse.client.data
Class ClickHouseBigIntegerValue
- java.lang.Object
-
- com.clickhouse.client.data.ClickHouseObjectValue<BigInteger>
-
- com.clickhouse.client.data.ClickHouseBigIntegerValue
-
- All Implemented Interfaces:
ClickHouseValue
,Serializable
public class ClickHouseBigIntegerValue extends ClickHouseObjectValue<BigInteger>
Wraper class of BigInteger.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClickHouseBigIntegerValue(BigInteger value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
asBigDecimal(int scale)
Gets value asBigDecimal
.BigInteger
asBigInteger()
Gets value asBigInteger
.byte
asByte()
Gets value as byte.double
asDouble()
Gets value as double.float
asFloat()
Gets value as float.int
asInteger()
Gets value as integer.long
asLong()
Gets value as long.Object
asObject()
Gets value as an object.short
asShort()
Gets value as short.ClickHouseBigIntegerValue
copy(boolean deep)
Gets a copy of this value object.static ClickHouseBigIntegerValue
of(ClickHouseValue ref, BigInteger value)
Update value of the given object or create a new instance ifref
is null.static ClickHouseBigIntegerValue
of(BigInteger value)
Wrap the given value.static ClickHouseBigIntegerValue
ofNull()
Create a new instance representing null value.static ClickHouseBigIntegerValue
ofNull(ClickHouseValue ref)
Update given value to null or create a new instance ifref
is null.String
toSqlExpression()
Converts the value to escaped SQL expression.ClickHouseBigIntegerValue
update(boolean value)
Updates value.ClickHouseBigIntegerValue
update(byte value)
Updates value.ClickHouseBigIntegerValue
update(char value)
Updates value.ClickHouseBigIntegerValue
update(double value)
Updates value.ClickHouseBigIntegerValue
update(float value)
Updates value.ClickHouseBigIntegerValue
update(int value)
Updates value.ClickHouseBigIntegerValue
update(long value)
Updates value.ClickHouseBigIntegerValue
update(short value)
Updates value.ClickHouseBigIntegerValue
update(ClickHouseValue value)
Updates value.ClickHouseBigIntegerValue
update(Enum<?> value)
Updates value.ClickHouseBigIntegerValue
update(Object value)
Updates value.ClickHouseBigIntegerValue
update(String value)
Updates value.ClickHouseBigIntegerValue
update(BigDecimal value)
Updates value.ClickHouseBigIntegerValue
update(BigInteger value)
Updates value.ClickHouseBigIntegerValue
update(Inet4Address value)
Updates value.ClickHouseBigIntegerValue
update(Inet6Address value)
Updates value.ClickHouseBigIntegerValue
update(LocalDate value)
Updates value.ClickHouseBigIntegerValue
update(LocalDateTime value)
Updates value.ClickHouseBigIntegerValue
update(LocalTime value)
Updates value.ClickHouseBigIntegerValue
update(UUID value)
Updates value.-
Methods inherited from class com.clickhouse.client.data.ClickHouseObjectValue
asString, equals, getValue, hashCode, isNullOrEmpty, resetToNullOrEmpty, set, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.clickhouse.client.ClickHouseValue
asArray, asArray, asBigDecimal, asBinary, asBinary, asBinary, asBinary, asBoolean, asByteStream, asCharacter, asCharacterStream, asDate, asDateTime, asDateTime, asEnum, asInet4Address, asInet6Address, asInstant, asInstant, asMap, asMap, asObject, asOffsetDateTime, asOffsetDateTime, asString, asString, asString, asTime, asTime, asTuple, asUuid, asZonedDateTime, asZonedDateTime, copy, isInfinity, isNaN, newUnsupportedException, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateUnknown
-
-
-
-
Constructor Detail
-
ClickHouseBigIntegerValue
protected ClickHouseBigIntegerValue(BigInteger value)
-
-
Method Detail
-
ofNull
public static ClickHouseBigIntegerValue ofNull()
Create a new instance representing null value.- Returns:
- new instance representing null value
-
ofNull
public static ClickHouseBigIntegerValue ofNull(ClickHouseValue ref)
Update given value to null or create a new instance ifref
is null.- Parameters:
ref
- object to update, could be null- Returns:
- same object as
ref
or a new instance if it's null
-
of
public static ClickHouseBigIntegerValue of(BigInteger value)
Wrap the given value.- Parameters:
value
- value- Returns:
- object representing the value
-
of
public static ClickHouseBigIntegerValue of(ClickHouseValue ref, BigInteger value)
Update value of the given object or create a new instance ifref
is null.- Parameters:
ref
- object to update, could be nullvalue
- value- Returns:
- same object as
ref
or a new instance if it's null
-
copy
public ClickHouseBigIntegerValue copy(boolean deep)
Description copied from interface:ClickHouseValue
Gets a copy of this value object.- Parameters:
deep
- true to create a deep copy; false for a shallow copy- Returns:
- copy of this value object
-
asByte
public byte asByte()
Description copied from interface:ClickHouseValue
Gets value as byte.- Specified by:
asByte
in interfaceClickHouseValue
- Overrides:
asByte
in classClickHouseObjectValue<BigInteger>
- Returns:
- byte value
-
asShort
public short asShort()
Description copied from interface:ClickHouseValue
Gets value as short.- Specified by:
asShort
in interfaceClickHouseValue
- Overrides:
asShort
in classClickHouseObjectValue<BigInteger>
- Returns:
- short value
-
asInteger
public int asInteger()
Description copied from interface:ClickHouseValue
Gets value as integer.- Specified by:
asInteger
in interfaceClickHouseValue
- Overrides:
asInteger
in classClickHouseObjectValue<BigInteger>
- Returns:
- integer value
-
asLong
public long asLong()
Description copied from interface:ClickHouseValue
Gets value as long.- Specified by:
asLong
in interfaceClickHouseValue
- Overrides:
asLong
in classClickHouseObjectValue<BigInteger>
- Returns:
- long value
-
asBigInteger
public BigInteger asBigInteger()
Description copied from interface:ClickHouseValue
Gets value asBigInteger
.- Specified by:
asBigInteger
in interfaceClickHouseValue
- Overrides:
asBigInteger
in classClickHouseObjectValue<BigInteger>
- Returns:
- big integer, could be null
-
asFloat
public float asFloat()
Description copied from interface:ClickHouseValue
Gets value as float.- Specified by:
asFloat
in interfaceClickHouseValue
- Overrides:
asFloat
in classClickHouseObjectValue<BigInteger>
- Returns:
- float value
-
asDouble
public double asDouble()
Description copied from interface:ClickHouseValue
Gets value as double.- Specified by:
asDouble
in interfaceClickHouseValue
- Overrides:
asDouble
in classClickHouseObjectValue<BigInteger>
- Returns:
- double value
-
asBigDecimal
public BigDecimal asBigDecimal(int scale)
Description copied from interface:ClickHouseValue
Gets value asBigDecimal
.- Specified by:
asBigDecimal
in interfaceClickHouseValue
- Overrides:
asBigDecimal
in classClickHouseObjectValue<BigInteger>
- Parameters:
scale
- scale of the decimal- Returns:
- big decimal, could be null
-
asObject
public Object asObject()
Description copied from interface:ClickHouseValue
Gets value as an object.- Specified by:
asObject
in interfaceClickHouseValue
- Overrides:
asObject
in classClickHouseObjectValue<BigInteger>
- Returns:
- an object representing the value, could be null
-
toSqlExpression
public String toSqlExpression()
Description copied from interface:ClickHouseValue
Converts the value to escaped SQL expression. For example, number 123 will be converted to123
, while string "12'3" will be converted to @{code '12\'3'}.- Specified by:
toSqlExpression
in interfaceClickHouseValue
- Overrides:
toSqlExpression
in classClickHouseObjectValue<BigInteger>
- Returns:
- escaped SQL expression
-
update
public ClickHouseBigIntegerValue update(boolean value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(char value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(byte value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(short value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(int value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(long value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(float value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(double value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(BigInteger value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(BigDecimal value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(Enum<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(Inet4Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(Inet6Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(LocalDate value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(LocalTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(LocalDateTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(String value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(UUID value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(ClickHouseValue value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBigIntegerValue update(Object value)
Description copied from interface:ClickHouseValue
Updates value. This method tries to identify type ofvalue
and then use corresponding update method to proceed. Unknown value will be passed toClickHouseValue.updateUnknown(Object)
.- Specified by:
update
in interfaceClickHouseValue
- Overrides:
update
in classClickHouseObjectValue<BigInteger>
- Parameters:
value
- value to update, could be null- Returns:
- this object
-
-