Enum DriverProperties

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

public enum DriverProperties extends Enum<DriverProperties>
JDBC driver specific properties. Does not include anything from ClientConfigProperties. Processing logic should be the follows 1. If property is among DriverProperties then Driver handles it specially and will not pass to a client 2. If property is not among DriverProperties then it is passed to a client
  • Enum Constant Details

    • IGNORE_UNSUPPORTED_VALUES

      public static final DriverProperties IGNORE_UNSUPPORTED_VALUES
      Indicates if driver should ignore unsupported values and methods. JDBC allows throwing SQLException for unsupported values and methods. But driver can ignore them and continue execution. Driver will do no operation in such case.
    • SCHEMA_TERM

      public static final DriverProperties SCHEMA_TERM
      Schema term to be used in the connection URL. Only `schema` is supported right now.
    • SECURE_CONNECTION

      public static final DriverProperties SECURE_CONNECTION
      Indicates if driver should create a secure connection over SSL/TLS
    • DEFAULT_QUERY_SETTINGS

      public static final DriverProperties DEFAULT_QUERY_SETTINGS
      Query settings to be passed along with query operation.
    • BETA_ROW_BINARY_WRITER

      public static final DriverProperties BETA_ROW_BINARY_WRITER
      Enables row binary writer for simple insert statements when PreparedStatement is used. Has limitation and can be used with a simple form of insert like; INSERT INTO t VALUES (?, ?, ?...)
    • RESULTSET_AUTO_CLOSE

      public static final DriverProperties RESULTSET_AUTO_CLOSE
      Enables closing result set before
    • USE_MAX_RESULT_ROWS

      public static final DriverProperties USE_MAX_RESULT_ROWS
      Enables using server property `max_result_rows` (ServerSettings.MAX_RESULT_ROWS to limit number of rows returned by query. Enabling this property will override user set overflow mode. It may cause error if server doesn't allow changing properties. When this property is not enabled then result set will stop reading data once limit is reached. As server may have more in a result set then it will require time to read all data to make HTTP connection usable again. In most cases this is fine. It is recommended to set limit in SQL query.
    • SQL_PARSER

      public static final DriverProperties SQL_PARSER
      Configures what SQL parser will be used. Choices:
      • ANTLR4 - parser extracts required information but PreparedStatement parameters parsed separately.
      • ANTLR4_PARAMS_PARSER - parser extracts required information AND parameter positions.
      • JAVACC - parser extracts required information but PreparedStatement parameters parsed separately.
    • QUERY_ID_GENERATOR

      public static final DriverProperties QUERY_ID_GENERATOR
      Sets query ID generator as Supplier<String> to be used for Query ID generation before sending request with client. When no set - queryID is generated by using UUID.randomUUID().
    • REMEMBER_LAST_SET_ROLES

      public static final DriverProperties REMEMBER_LAST_SET_ROLES
      Controls logic of saving roles that were set using SET <role> statement. Default: true - save roles
    • CUSTOM_HTTP_PARAMS

      @Deprecated public static final DriverProperties CUSTOM_HTTP_PARAMS
      Deprecated.
      Deprecated and will be removed. This property is here to keep backward compatibility with com.clickhouse.client.http.config.ClickHouseHttpOption#CUSTOM_PARAMS. Original property is deprecated for com.clickhouse.client.config.ClickHouseClientOption#CUSTOM_SETTINGS This property is expected to be a comma separated list of key-value pair that should be sent to server. Pairs will be converted to new properties for client config. Use ClientConfigProperties.serverSetting(String) instead
    • CUSTOM_SETTINGS

      @Deprecated public static final DriverProperties CUSTOM_SETTINGS
      Deprecated.
      Deprecated and will be removed. This property is here to keep backward compatibility with com.clickhouse.client.config.ClickHouseClientOption#CUSTOM_SETTINGS. This property is expected to be a comma separated list of key-value pair that should be sent to server. Pairs will be converted to new properties for client config. Use ClientConfigProperties.serverSetting(String) instead
    • USE_TZ_FOR_DATES

      @Deprecated public static final DriverProperties USE_TZ_FOR_DATES
      Deprecated.
      Deprecated as driver do not convert Date values to any timezone. Dates are sent as is. Problem having this setting on connection level is that affects all child statements and there is no way to control on column basis. Driver ignores this setting but will throw exception when it is completely removed.
    • HTTP_CONNECTION_PROVIDER

      @Deprecated public static final DriverProperties HTTP_CONNECTION_PROVIDER
      Deprecated.
      Current driver implementation uses only one http provider. So setting it has no effect. Deprecated will be removed soon
  • Method Details

    • values

      public static DriverProperties[] 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 DriverProperties 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
    • getKey

      public String getKey()
    • getDefaultValue

      public String getDefaultValue()
    • getChoices

      public List<String> getChoices()
    • serverSetting

      public static String serverSetting(String key)
    • httpHeader

      public static String httpHeader(String key)