Package com.clickhouse.jdbc

# Interface ClickHouseConnection

All Superinterfaces:
  `AutoCloseable`, `Connection`, `Wrapper`

@Deprecated public interface ClickHouseConnection extends Connection
Deprecated.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`COLUMN_ARRAY`
Deprecated.
`static final String`
`COLUMN_ELEMENT`
Deprecated.
`static final String`
`PROP_APPLICATION_NAME`
Deprecated.
`static final String`
`PROP_CUSTOM_HTTP_HEADERS`
Deprecated.
`static final String`
`PROP_CUSTOM_HTTP_PARAMS`
Deprecated.

### Fields inherited from interface java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`allowCustomSetting()`
Deprecated.
Checks whether custom setting is allowed or not.
`void`
`begin()`
Deprecated.
Starts a new transaction.
`default ClickHouseArray`
`createArrayOf(String typeName, Object[] elements)`
Deprecated.
`default ClickHouseBlob`
`createBlob()`
Deprecated.
`default ClickHouseClob`
`createClob()`
Deprecated.
`default ClickHouseXml`
`createSQLXML()`
Deprecated.
`default ClickHouseStatement`
`createStatement()`
Deprecated.
`default ClickHouseStatement`
`createStatement(int resultSetType, int resultSetConcurrency)`
Deprecated.
`ClickHouseStatement`
`createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
Deprecated.
`default ClickHouseStruct`
`createStruct(String typeName, Object[] attributes)`
Deprecated.
`ClickHouseConfig`
`getConfig()`
Deprecated.
Gets configuration tied to this connection.
`String`
`getCurrentDatabase()`
Deprecated.
Gets current database.
`String`
`getCurrentUser()`
Deprecated.
Gets current user.
`Calendar`
`getDefaultCalendar()`
Deprecated.
Gets default calendar which can be used to create timestamp.
`Optional<TimeZone>`
`getEffectiveTimeZone()`
Deprecated.
Gets effective time zone.
`JdbcConfig`
`getJdbcConfig()`
Deprecated.
Gets JDBC-specific configuration.
`default JdbcTypeMapping`
`getJdbcTypeMapping()`
Deprecated.
Gets JDBC type mapping.
`TimeZone`
`getJvmTimeZone()`
Deprecated.
Gets cached value of `TimeZone.getDefault()`.
`long`
`getMaxInsertBlockSize()`
Deprecated.
Gets max insert block size.
`TimeZone`
`getServerTimeZone()`
Deprecated.
Gets server time zone, which is either same as result of `select timezone()`, or the overrided value from `ClickHouseConfig.getServerTimeZone()`.
`ClickHouseVersion`
`getServerVersion()`
Deprecated.
Gets server version.
`ClickHouseTransaction`
`getTransaction()`
Deprecated.
Gets current transaction.
`URI`
`getUri()`
Deprecated.
Gets URI of the connection.
`boolean`
`isImplicitTransactionSupported()`
Deprecated.
Checks whether implicit transaction is supported.
`boolean`
`isTransactionSupported()`
Deprecated.
Checks whether transaction is supported.
`String`
`newQueryId()`
Deprecated.
Creates a new query ID.
`default com.clickhouse.jdbc.parser.ClickHouseSqlStatement[]`
`parse(String sql, ClickHouseConfig config)`
Deprecated.
will be removed in 0.5, please use `parse(String, ClickHouseConfig, Map)` instead
`com.clickhouse.jdbc.parser.ClickHouseSqlStatement[]`
`parse(String sql, ClickHouseConfig config, Map<String,Serializable> settings)`
Deprecated.
Parses the given sql.
`default CallableStatement`
`prepareCall(String sql)`
Deprecated.
`default CallableStatement`
`prepareCall(String sql, int resultSetType, int resultSetConcurrency)`
Deprecated.
`default CallableStatement`
`prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
Deprecated.
`default PreparedStatement`
`prepareStatement(String sql)`
Deprecated.
`default PreparedStatement`
`prepareStatement(String sql, int autoGeneratedKeys)`
Deprecated.
`default PreparedStatement`
`prepareStatement(String sql, int[] columnIndexes)`
Deprecated.
`default PreparedStatement`
`prepareStatement(String sql, int resultSetType, int resultSetConcurrency)`
Deprecated.
`default PreparedStatement`
`prepareStatement(String sql, String[] columnNames)`
Deprecated.
`void`
`setCurrentDatabase(String database, boolean check)`
Deprecated.
Sets current database.

### Methods inherited from interface java.sql.Connection

`abort, beginRequest, clearWarnings, close, commit, createNClob, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap`

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

## Field Details

### COLUMN_ELEMENT

static final String COLUMN_ELEMENT
Deprecated.

See Also:
  - Constant Field Values

### COLUMN_ARRAY

static final String COLUMN_ARRAY
Deprecated.

See Also:
  - Constant Field Values

### PROP_APPLICATION_NAME

static final String PROP_APPLICATION_NAME
Deprecated.

See Also:
  - Constant Field Values

### PROP_CUSTOM_HTTP_HEADERS

static final String PROP_CUSTOM_HTTP_HEADERS
Deprecated.

See Also:
  - Constant Field Values

### PROP_CUSTOM_HTTP_PARAMS

static final String PROP_CUSTOM_HTTP_PARAMS
Deprecated.

See Also:
  - Constant Field Values

## Method Details

### createArrayOf

default ClickHouseArray createArrayOf(String typeName, Object[] elements) throws SQLException
Deprecated.

Specified by:
  `createArrayOf` in interface `Connection`
Throws:
  `SQLException`

### createBlob

default ClickHouseBlob createBlob() throws SQLException
Deprecated.

Specified by:
  `createBlob` in interface `Connection`
Throws:
  `SQLException`

### createClob

default ClickHouseClob createClob() throws SQLException
Deprecated.

Specified by:
  `createClob` in interface `Connection`
Throws:
  `SQLException`

### createStruct

default ClickHouseStruct createStruct(String typeName, Object[] attributes) throws SQLException
Deprecated.

Specified by:
  `createStruct` in interface `Connection`
Throws:
  `SQLException`

### createSQLXML

default ClickHouseXml createSQLXML() throws SQLException
Deprecated.

Specified by:
  `createSQLXML` in interface `Connection`
Throws:
  `SQLException`

### createStatement

default ClickHouseStatement createStatement() throws SQLException
Deprecated.

Specified by:
  `createStatement` in interface `Connection`
Throws:
  `SQLException`

### createStatement

default ClickHouseStatement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
Deprecated.

Specified by:
  `createStatement` in interface `Connection`
Throws:
  `SQLException`

### createStatement

ClickHouseStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
Deprecated.

Specified by:
  `createStatement` in interface `Connection`
Throws:
  `SQLException`

### prepareCall

default CallableStatement prepareCall(String sql) throws SQLException
Deprecated.

Specified by:
  `prepareCall` in interface `Connection`
Throws:
  `SQLException`

### prepareCall

default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
Deprecated.

Specified by:
  `prepareCall` in interface `Connection`
Throws:
  `SQLException`

### prepareCall

default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
Deprecated.

Specified by:
  `prepareCall` in interface `Connection`
Throws:
  `SQLException`

### prepareStatement

default PreparedStatement prepareStatement(String sql) throws SQLException
Deprecated.

Specified by:
  `prepareStatement` in interface `Connection`
Throws:
  `SQLException`

### prepareStatement

default PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
Deprecated.

Specified by:
  `prepareStatement` in interface `Connection`
Throws:
  `SQLException`

### prepareStatement

default PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
Deprecated.

Specified by:
  `prepareStatement` in interface `Connection`
Throws:
  `SQLException`

### prepareStatement

default PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
Deprecated.

Specified by:
  `prepareStatement` in interface `Connection`
Throws:
  `SQLException`

### prepareStatement

default PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
Deprecated.

Specified by:
  `prepareStatement` in interface `Connection`
Throws:
  `SQLException`

### begin

void begin() throws SQLException
Deprecated.
Starts a new transaction. It's no-op for a newly started transaction.

Throws:
  `SQLException` - when current transaction is active state or not able to start new transaction

### getConfig

ClickHouseConfig getConfig()
Deprecated.
Gets configuration tied to this connection.

Returns:
  non-null configuration

### allowCustomSetting

boolean allowCustomSetting()
Deprecated.
Checks whether custom setting is allowed or not.

Returns:
  true if custom setting is allowed; false otherwise

### getCurrentDatabase

String getCurrentDatabase()
Deprecated.
Gets current database. `Connection.getSchema()` is similar but it will check if connection is closed or not hence may throw `SQLException`.

Returns:
  non-null database name

### setCurrentDatabase

void setCurrentDatabase(String database, boolean check) throws SQLException
Deprecated.
Sets current database.

Parameters:
  `database` - non-empty database name
  `check` - whether to check if the database exists or not
Throws:
  `SQLException` - when failed to change current database

### getCurrentUser

String getCurrentUser()
Deprecated.
Gets current user.

Returns:
  non-null user name

### getDefaultCalendar

Calendar getDefaultCalendar()
Deprecated.
Gets default calendar which can be used to create timestamp.

Returns:
  non-null calendar

### getEffectiveTimeZone

Optional<TimeZone> getEffectiveTimeZone()
Deprecated.
Gets effective time zone. When `ClickHouseConfig.isUseServerTimeZone()` returns `false`, `ClickHouseConfig.getUseTimeZone()` will be used as effective time zone, which will be used for reading and writing timestamp values.

Returns:
  effective time zone

### getJvmTimeZone

TimeZone getJvmTimeZone()
Deprecated.
Gets cached value of `TimeZone.getDefault()`.

Returns:
  non-null cached JVM time zone

### getServerTimeZone

TimeZone getServerTimeZone()
Deprecated.
Gets server time zone, which is either same as result of `select timezone()`, or the overrided value from `ClickHouseConfig.getServerTimeZone()`.

Returns:
  non-null server time zone

### getServerVersion

ClickHouseVersion getServerVersion()
Deprecated.
Gets server version.

Returns:
  non-null server version

### getTransaction

ClickHouseTransaction getTransaction()
Deprecated.
Gets current transaction.

Returns:
  current transaction, which could be null

### getUri

URI getUri()
Deprecated.
Gets URI of the connection.

Returns:
  URI of the connection

### getJdbcConfig

JdbcConfig getJdbcConfig()
Deprecated.
Gets JDBC-specific configuration.

Returns:
  non-null JDBC-specific configuration

### getJdbcTypeMapping

default JdbcTypeMapping getJdbcTypeMapping()
Deprecated.
Gets JDBC type mapping. Same as `getJdbcConfig().getMapper()`.

Returns:
  non-null JDBC type mapping

### getMaxInsertBlockSize

long getMaxInsertBlockSize()
Deprecated.
Gets max insert block size. Pay attention that INSERT into one partition in one table of MergeTree family up to max_insert_block_size rows is transactional.

Returns:
  value of max_insert_block_size

### isTransactionSupported

boolean isTransactionSupported()
Deprecated.
Checks whether transaction is supported.

Returns:
  true if transaction is supported; false otherwise

### isImplicitTransactionSupported

boolean isImplicitTransactionSupported()
Deprecated.
Checks whether implicit transaction is supported.

Returns:
  true if implicit transaction is supported; false otherwise

### newQueryId

String newQueryId()
Deprecated.
Creates a new query ID.

Returns:
  universal unique query ID

### parse

@Deprecated default com.clickhouse.jdbc.parser.ClickHouseSqlStatement[] parse(String sql, ClickHouseConfig config)
Deprecated.
will be removed in 0.5, please use `parse(String, ClickHouseConfig, Map)` instead
Parses the given sql.

Parameters:
  `sql` - sql to parse
  `config` - configuration which might be used for parsing, could be null
Returns:
  non-null parsed sql statements

### parse

com.clickhouse.jdbc.parser.ClickHouseSqlStatement[] parse(String sql, ClickHouseConfig config, Map<String,Serializable> settings)
Deprecated.
Parses the given sql.

Parameters:
  `sql` - sql to parse
  `config` - configuration which might be used for parsing, could be null
  `settings` - server settings
Returns:
  non-null parsed sql statements