Interface ClickHouseArraySequence

All Superinterfaces:
ClickHouseValue, Serializable
All Known Implementing Classes:
ClickHouseArrayValue

public interface ClickHouseArraySequence extends ClickHouseValue
This interface represents a generic array value.
  • Method Details

    • allocate

      default ClickHouseArraySequence allocate(int length)
      Allocates an array according to given length. Same as allocate(length, Object.class, 1).
      Parameters:
      length - length of the array
      Returns:
      this value
    • allocate

      default ClickHouseArraySequence allocate(int length, Class<?> clazz)
      Allocates an array according to given arguments. Same as allocate(length, clazz, 1).
      Parameters:
      length - length of the array
      clazz - optional value type, null means Object.class
      Returns:
      this value
    • allocate

      ClickHouseArraySequence allocate(int length, Class<?> clazz, int level)
      Allocates an array according to given arguments. Pay attention that this will will not create new array but reuse existing one, when length are clazz not changed.
      Parameters:
      length - length of the array
      clazz - optional value type, null means Object.class
      level - level of the array, zero or negative number is treated as 1
      Returns:
      this value
    • length

      int length()
      Gets length of this array.
      Returns:
      length of this array
    • getValue

      <V extends ClickHouseValue> V getValue(int index, V value)
      Gets value at the specified position in this array.
      Type Parameters:
      V - type of the value
      Parameters:
      index - index which is greater than or equal to zero and it's always smaller than length()
      value - non-null template object to retrieve the value
      Returns:
      non-null value which is same as value
    • setValue

      ClickHouseArraySequence setValue(int index, ClickHouseValue value)
      Sets value to the specified position in this array.
      Parameters:
      index - index which is greater than or equal to zero and it's always smaller than length()
      value - non-null container of the value
      Returns:
      this value
    • copy

      default ClickHouseArraySequence copy()
      Description copied from interface: ClickHouseValue
      Gets a shallow copy of this value object. Same as copy(false).
      Specified by:
      copy in interface ClickHouseValue
      Returns:
      shallow copy of this value object
    • copy

      ClickHouseArraySequence copy(boolean deep)
      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