Class ClickHouseBoolValue

java.lang.Object
com.clickhouse.data.value.ClickHouseBoolValue
All Implemented Interfaces:
ClickHouseValue, Serializable

@Deprecated public class ClickHouseBoolValue extends Object implements ClickHouseValue
Deprecated.
Wrapper class of bool.
See Also:
  • Constructor Details

    • ClickHouseBoolValue

      protected ClickHouseBoolValue(boolean isNull, boolean value)
      Deprecated.
  • Method Details

    • ofNull

      public static ClickHouseBoolValue ofNull()
      Deprecated.
      Create a new instance representing null value.
      Returns:
      new instance representing null value
    • ofNull

      public static ClickHouseBoolValue ofNull(ClickHouseValue ref)
      Deprecated.
      Update given value to null or create a new instance if ref 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 ClickHouseBoolValue of(boolean value)
      Deprecated.
      Wrap the given value.
      Parameters:
      value - value
      Returns:
      object representing the value
    • of

      public static ClickHouseBoolValue of(int value)
      Deprecated.
      Wrap the given value.
      Parameters:
      value - value
      Returns:
      object representing the value
    • of

      public static ClickHouseBoolValue of(ClickHouseValue ref, boolean value)
      Deprecated.
      Update value of the given object or create a new instance if ref is null.
      Parameters:
      ref - object to update, could be null
      value - value
      Returns:
      same object as ref or a new instance if it's null
    • set

      protected ClickHouseBoolValue set(boolean isNull, boolean value)
      Deprecated.
    • getValue

      public boolean getValue()
      Deprecated.
      Gets value.
      Returns:
      value
    • copy

      public ClickHouseBoolValue copy(boolean deep)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets a copy of this value object.
      Specified by:
      copy in interface ClickHouseValue
      Parameters:
      deep - true to create a deep copy; false for a shallow copy
      Returns:
      copy of this value object
    • isNullOrEmpty

      public boolean isNullOrEmpty()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Checks 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 false for an empty string. This is because String is treated as value-based type instead of a container like Array.

      Specified by:
      isNullOrEmpty in interface ClickHouseValue
      Returns:
      true if the value is null or empty; false otherwise
    • asByte

      public byte asByte()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as byte.
      Specified by:
      asByte in interface ClickHouseValue
      Returns:
      byte value
    • asShort

      public short asShort()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as short.
      Specified by:
      asShort in interface ClickHouseValue
      Returns:
      short value
    • asInteger

      public int asInteger()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as integer.
      Specified by:
      asInteger in interface ClickHouseValue
      Returns:
      integer value
    • asLong

      public long asLong()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as long.
      Specified by:
      asLong in interface ClickHouseValue
      Returns:
      long value
    • asBigInteger

      public BigInteger asBigInteger()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as BigInteger.
      Specified by:
      asBigInteger in interface ClickHouseValue
      Returns:
      big integer, could be null
    • asFloat

      public float asFloat()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as float.
      Specified by:
      asFloat in interface ClickHouseValue
      Returns:
      float value
    • asDouble

      public double asDouble()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as double.
      Specified by:
      asDouble in interface ClickHouseValue
      Returns:
      double value
    • asBigDecimal

      public BigDecimal asBigDecimal(int scale)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as BigDecimal.
      Specified by:
      asBigDecimal in interface ClickHouseValue
      Parameters:
      scale - scale of the decimal
      Returns:
      big decimal, could be null
    • asObject

      public Object asObject()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as an object.
      Specified by:
      asObject in interface ClickHouseValue
      Returns:
      an object representing the value, could be null
    • asString

      public String asString()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Gets value as unbounded string, using default charset(usually UTF-8).
      Specified by:
      asString in interface ClickHouseValue
      Returns:
      string value, could be null
    • resetToDefault

      public ClickHouseBoolValue resetToDefault()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Resets to default value of corresponding data type.
      Specified by:
      resetToDefault in interface ClickHouseValue
      Returns:
      this object
    • resetToNullOrEmpty

      public ClickHouseBoolValue resetToNullOrEmpty()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Resets value to null, or empty when null is not supported(e.g. Array, Tuple and Map etc.).

      Keep in mind that String is value-based type, so this method will change its value to null instead of an empty string.

      Specified by:
      resetToNullOrEmpty in interface ClickHouseValue
      Returns:
      this object
    • toSqlExpression

      public String toSqlExpression()
      Deprecated.
      Description copied from interface: ClickHouseValue
      Converts the value to escaped SQL expression. For example, number 123 will be converted to 123, while string "12'3" will be converted to @{code '12\'3'}.
      Specified by:
      toSqlExpression in interface ClickHouseValue
      Returns:
      escaped SQL expression
    • update

      public ClickHouseBoolValue update(char value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(byte value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(short value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(int value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(long value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(float value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(double value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(BigInteger value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(BigDecimal value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(Enum<?> value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(String value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(ClickHouseValue value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value.
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update
      Returns:
      this object
    • update

      public ClickHouseBoolValue update(Object value)
      Deprecated.
      Description copied from interface: ClickHouseValue
      Updates value. This method tries to identify type of value and then use corresponding update method to proceed. Unknown value will be passed to ClickHouseValue.updateUnknown(Object).
      Specified by:
      update in interface ClickHouseValue
      Parameters:
      value - value to update, could be null
      Returns:
      this object
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object