Package com.clickhouse.data.value
Class ClickHouseBitmapValue
java.lang.Object
com.clickhouse.data.value.ClickHouseObjectValue<ClickHouseBitmap>
com.clickhouse.data.value.ClickHouseBitmapValue
- All Implemented Interfaces:
ClickHouseValue,Serializable
Wrapper class of
Bitmap.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasBigDecimal(int scale) Gets value asBigDecimal.Gets value asBigInteger.byteasByte()Gets value as byte.doubleasDouble()Gets value as double.floatasFloat()Gets value as float.intGets value as integer.longasLong()Gets value as long.asObject()Gets value as an object.shortasShort()Gets value as short.copy(boolean deep) Gets a copy of this value object.longbooleanChecks whether the value is nullable.booleanChecks if the value is null, or empty for non-null types like Array, Tuple and Map.static ClickHouseBitmapValueof(ClickHouseValue ref, ClickHouseBitmap value) Update value of the given object or create a new instance ifrefis null.static ClickHouseBitmapValueof(ClickHouseBitmap value) Wrap the given value.static ClickHouseBitmapValueofEmpty(ClickHouseDataType valueType) Create a new instance representing empty value.static ClickHouseBitmapValueofEmpty(ClickHouseValue ref, ClickHouseDataType valueType) Update given value to empty or create a new instance ifrefis null.Resets to default value of corresponding data type.Converts the value to escaped SQL expression.update(boolean value) Updates value.update(byte value) Updates value.update(char value) Updates value.update(double value) Updates value.update(float value) Updates value.update(int value) Updates value.update(long value) Updates value.update(short value) Updates value.update(ClickHouseValue value) Updates value.Updates value.Updates value.Updates value.update(BigDecimal value) Updates value.update(BigInteger value) Updates value.update(Inet4Address value) Updates value.update(Inet6Address value) Updates value.Updates value.update(LocalDateTime value) Updates value.Updates value.Updates value.Methods inherited from class com.clickhouse.data.value.ClickHouseObjectValue
asString, equals, getValue, hashCode, resetToNullOrEmpty, set, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.clickhouse.data.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, asRawObject, 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 Details
-
ClickHouseBitmapValue
-
-
Method Details
-
ofEmpty
Create a new instance representing empty value.- Parameters:
valueType- value type, must be native integer- Returns:
- new instance representing empty value
-
ofEmpty
Update given value to empty or create a new instance ifrefis null.- Parameters:
ref- object to update, could be nullvalueType- value type, must be native integer- Returns:
- same object as
refor a new instance if it's null
-
of
Wrap the given value.- Parameters:
value- value- Returns:
- object representing the value
-
of
Update value of the given object or create a new instance ifrefis null.- Parameters:
ref- object to update, could be nullvalue- value- Returns:
- same object as
refor a new instance if it's null
-
copy
Description copied from interface:ClickHouseValueGets 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
-
isNullable
public boolean isNullable()Description copied from interface:ClickHouseValueChecks whether the value is nullable. This always returnsfalsefor nested value type.- Returns:
- true if the value is nullable; false otherwise
-
isNullOrEmpty
public boolean isNullOrEmpty()Description copied from interface:ClickHouseValueChecks if the value is null, or empty for non-null types like Array, Tuple and Map.Please pay attention that only nullability will be considered for String, meaning this method will return
falsefor an empty string. This is because String is treated as value-based type instead of a container like Array.- Specified by:
isNullOrEmptyin interfaceClickHouseValue- Overrides:
isNullOrEmptyin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- true if the value is null or empty; false otherwise
-
asByte
public byte asByte()Description copied from interface:ClickHouseValueGets value as byte.- Specified by:
asBytein interfaceClickHouseValue- Overrides:
asBytein classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- byte value
-
asShort
public short asShort()Description copied from interface:ClickHouseValueGets value as short.- Specified by:
asShortin interfaceClickHouseValue- Overrides:
asShortin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- short value
-
asInteger
public int asInteger()Description copied from interface:ClickHouseValueGets value as integer.- Specified by:
asIntegerin interfaceClickHouseValue- Overrides:
asIntegerin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- integer value
-
asLong
public long asLong()Description copied from interface:ClickHouseValueGets value as long.- Specified by:
asLongin interfaceClickHouseValue- Overrides:
asLongin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- long value
-
asBigInteger
Description copied from interface:ClickHouseValueGets value asBigInteger.- Specified by:
asBigIntegerin interfaceClickHouseValue- Overrides:
asBigIntegerin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- big integer, could be null
-
asFloat
public float asFloat()Description copied from interface:ClickHouseValueGets value as float.- Specified by:
asFloatin interfaceClickHouseValue- Overrides:
asFloatin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- float value
-
asDouble
public double asDouble()Description copied from interface:ClickHouseValueGets value as double.- Specified by:
asDoublein interfaceClickHouseValue- Overrides:
asDoublein classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- double value
-
asBigDecimal
Description copied from interface:ClickHouseValueGets value asBigDecimal.- Specified by:
asBigDecimalin interfaceClickHouseValue- Overrides:
asBigDecimalin classClickHouseObjectValue<ClickHouseBitmap>- Parameters:
scale- scale of the decimal- Returns:
- big decimal, could be null
-
asObject
Description copied from interface:ClickHouseValueGets value as an object.- Specified by:
asObjectin interfaceClickHouseValue- Overrides:
asObjectin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- an object representing the value, could be null
-
getCardinality
public long getCardinality() -
resetToDefault
Description copied from interface:ClickHouseValueResets to default value of corresponding data type.- Returns:
- this object
-
toSqlExpression
Description copied from interface:ClickHouseValueConverts 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:
toSqlExpressionin interfaceClickHouseValue- Overrides:
toSqlExpressionin classClickHouseObjectValue<ClickHouseBitmap>- Returns:
- escaped SQL expression
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value.- Parameters:
value- value to update- Returns:
- this object
-
update
Description copied from interface:ClickHouseValueUpdates value. This method tries to identify type ofvalueand then use corresponding update method to proceed. Unknown value will be passed toClickHouseValue.updateUnknown(Object).- Specified by:
updatein interfaceClickHouseValue- Overrides:
updatein classClickHouseObjectValue<ClickHouseBitmap>- Parameters:
value- value to update, could be null- Returns:
- this object
-