Enum ClickHouseFormat

java.lang.Object
java.lang.Enum<ClickHouseFormat>
com.clickhouse.data.ClickHouseFormat
All Implemented Interfaces:
Serializable, Comparable<ClickHouseFormat>, java.lang.constant.Constable

public enum ClickHouseFormat extends Enum<ClickHouseFormat>
All formats supported by ClickHouse. More information at: https://clickhouse.com/docs/en/interfaces/formats/.
  • Enum Constant Details

  • Method Details

    • values

      public static ClickHouseFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ClickHouseFormat valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromFileName

      public static ClickHouseFormat fromFileName(String file)
      Gets format based on given file name.
      Parameters:
      file - file name
      Returns:
      format, could be null
    • supportsInput

      public boolean supportsInput()
      Checks if the format can be used for input.
      Returns:
      true if the format can be used for input; false otherwise
    • supportsOutput

      public boolean supportsOutput()
      Checks if the format can be used for output.
      Returns:
      true if the format can be used for output; false otherwise
    • isBinary

      public boolean isBinary()
      Checks if the format is binary-based or not.
      Returns:
      true if the format is binary-based; false otherwise
    • isText

      public boolean isText()
      Checks if the format is text-based or not.
      Returns:
      true if the format is text-based; false otherwise
    • hasHeader

      public boolean hasHeader()
      Checks if the format contains header like names and/or types.
      Returns:
      true if the format contains header; false otherwise
    • isRowBased

      public boolean isRowBased()
      Check whether the format is row based(e.g. read/write by row), which is a very useful hint on how to process the data.
      Returns:
      true if the format is row based; false otherwise(e.g. column, document, or structured-object etc.)
    • defaultInputFormat

      public ClickHouseFormat defaultInputFormat()
      Gets default input format, which usually does not has header.
      Returns:
      non-null input format