Package com.clickhouse.jdbc.internal
Class ClickHouseConnectionImpl
java.lang.Object
com.clickhouse.jdbc.JdbcWrapper
com.clickhouse.jdbc.internal.ClickHouseConnectionImpl
- All Implemented Interfaces:
ClickHouseConnection,AutoCloseable,Connection,Wrapper
@Deprecated
public class ClickHouseConnectionImpl
extends JdbcWrapper
implements ClickHouseConnection
Deprecated.
-
Field Summary
Fields inherited from interface com.clickhouse.jdbc.ClickHouseConnection
COLUMN_ARRAY, COLUMN_ELEMENT, PROP_APPLICATION_NAME, PROP_CUSTOM_HTTP_HEADERS, PROP_CUSTOM_HTTP_PARAMSFields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Deprecated.ClickHouseConnectionImpl(String url, Properties properties) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.booleanDeprecated.Checks whether custom setting is allowed or not.voidbegin()Deprecated.Starts a new transaction.voidDeprecated.voidclose()Deprecated.voidcommit()Deprecated.Deprecated.protected JdbcSavepointDeprecated.createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) Deprecated.protected JdbcTransactionDeprecated.protected voidDeprecated.Checks if the connection is open or not.protected voidensureSupport(String feature, boolean silent) Deprecated.Checks if a feature can be supported or not.protected voidDeprecated.booleanDeprecated.Deprecated.Deprecated.getClientInfo(String name) Deprecated.Deprecated.Gets configuration tied to this connection.Deprecated.Gets current database.Deprecated.Gets current user.protected StringDeprecated.Deprecated.Gets default calendar which can be used to create timestamp.Deprecated.Gets effective time zone.intDeprecated.Deprecated.Gets JDBC-specific configuration.Deprecated.Gets cached value ofTimeZone.getDefault().longDeprecated.Gets max insert block size.Deprecated.intDeprecated.Deprecated.protected static ClickHouseRecordgetServerInfo(ClickHouseNode node, ClickHouseRequest<?> request, boolean createDbIfNotExist) Deprecated.Deprecated.Gets server time zone, which is either same as result ofselect timezone(), or the overrided value fromClickHouseConfig.getServerTimeZone().Deprecated.Gets server version.protected List<ClickHouseColumn>getTableColumns(String dbName, String tableName, String columns) Deprecated.Deprecated.Gets current transaction.intDeprecated.Deprecated.getUri()Deprecated.Gets URI of the connection.Deprecated.booleanisClosed()Deprecated.booleanDeprecated.Checks whether implicit transaction is supported.booleanDeprecated.booleanDeprecated.Checks whether transaction is supported.booleanisValid(int timeout) Deprecated.booleanisWrapperFor(Class<?> iface) Deprecated.Deprecated.Deprecated.Creates a new query ID.parse(String sql, ClickHouseConfig config, Map<String, Serializable> settings) Deprecated.Parses the given sql.prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Deprecated.voidreleaseSavepoint(Savepoint savepoint) Deprecated.voidrollback()Deprecated.voidDeprecated.voidsetAutoCommit(boolean autoCommit) Deprecated.voidsetCatalog(String catalog) Deprecated.voidsetClientInfo(String name, String value) Deprecated.voidsetClientInfo(Properties properties) Deprecated.voidsetCurrentDatabase(String db, boolean check) Deprecated.Sets current database.voidsetHoldability(int holdability) Deprecated.voidsetNetworkTimeout(Executor executor, int milliseconds) Deprecated.voidsetReadOnly(boolean readOnly) Deprecated.Deprecated.setSavepoint(String name) Deprecated.voidDeprecated.voidsetTransactionIsolation(int level) Deprecated.voidsetTypeMap(Map<String, Class<?>> map) Deprecated.<T> TDeprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.clickhouse.jdbc.ClickHouseConnection
createArrayOf, createBlob, createClob, createSQLXML, createStatement, createStatement, createStruct, getJdbcTypeMapping, parse, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatementMethods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Constructor Details
-
ClickHouseConnectionImpl
Deprecated.- Throws:
SQLException
-
ClickHouseConnectionImpl
Deprecated.- Throws:
SQLException
-
ClickHouseConnectionImpl
public ClickHouseConnectionImpl(ClickHouseJdbcUrlParser.ConnectionInfo connInfo) throws SQLException Deprecated.- Throws:
SQLException
-
-
Method Details
-
getServerInfo
protected static ClickHouseRecord getServerInfo(ClickHouseNode node, ClickHouseRequest<?> request, boolean createDbIfNotExist) throws SQLException Deprecated.- Throws:
SQLException
-
createTransaction
Deprecated.- Throws:
SQLException
-
createSavepoint
Deprecated. -
ensureOpen
Deprecated.Checks if the connection is open or not.- Throws:
SQLException- when the connection is closed
-
ensureSupport
Deprecated.Checks if a feature can be supported or not.- Parameters:
feature- non-empty feature namesilent- whether to show warning in log or throw unsupported exception- Throws:
SQLException- when the feature is not supported and silent isfalse
-
ensureTransactionSupport
Deprecated.- Throws:
SQLException
-
getTableColumns
protected List<ClickHouseColumn> getTableColumns(String dbName, String tableName, String columns) throws SQLException Deprecated.- Throws:
SQLException
-
getDatabase
Deprecated.- Throws:
SQLException
-
nativeSQL
Deprecated.- Specified by:
nativeSQLin interfaceConnection- Throws:
SQLException
-
setAutoCommit
Deprecated.- Specified by:
setAutoCommitin interfaceConnection- Throws:
SQLException
-
getAutoCommit
Deprecated.- Specified by:
getAutoCommitin interfaceConnection- Throws:
SQLException
-
begin
Deprecated.Description copied from interface:ClickHouseConnectionStarts a new transaction. It's no-op for a newly started transaction.- Specified by:
beginin interfaceClickHouseConnection- Throws:
SQLException- when current transaction is active state or not able to start new transaction
-
commit
Deprecated.- Specified by:
commitin interfaceConnection- Throws:
SQLException
-
rollback
Deprecated.- Specified by:
rollbackin interfaceConnection- Throws:
SQLException
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection- Throws:
SQLException
-
isClosed
Deprecated.- Specified by:
isClosedin interfaceConnection- Throws:
SQLException
-
getMetaData
Deprecated.- Specified by:
getMetaDatain interfaceConnection- Throws:
SQLException
-
setReadOnly
Deprecated.- Specified by:
setReadOnlyin interfaceConnection- Throws:
SQLException
-
isReadOnly
Deprecated.- Specified by:
isReadOnlyin interfaceConnection- Throws:
SQLException
-
setCatalog
Deprecated.- Specified by:
setCatalogin interfaceConnection- Throws:
SQLException
-
getCatalog
Deprecated.- Specified by:
getCatalogin interfaceConnection- Throws:
SQLException
-
setTransactionIsolation
Deprecated.- Specified by:
setTransactionIsolationin interfaceConnection- Throws:
SQLException
-
getTransactionIsolation
Deprecated.- Specified by:
getTransactionIsolationin interfaceConnection- Throws:
SQLException
-
getWarnings
Deprecated.- Specified by:
getWarningsin interfaceConnection- Throws:
SQLException
-
clearWarnings
Deprecated.- Specified by:
clearWarningsin interfaceConnection- Throws:
SQLException
-
getTypeMap
Deprecated.- Specified by:
getTypeMapin interfaceConnection- Throws:
SQLException
-
setTypeMap
Deprecated.- Specified by:
setTypeMapin interfaceConnection- Throws:
SQLException
-
setHoldability
Deprecated.- Specified by:
setHoldabilityin interfaceConnection- Throws:
SQLException
-
getHoldability
Deprecated.- Specified by:
getHoldabilityin interfaceConnection- Throws:
SQLException
-
setSavepoint
Deprecated.- Specified by:
setSavepointin interfaceConnection- Throws:
SQLException
-
setSavepoint
Deprecated.- Specified by:
setSavepointin interfaceConnection- Throws:
SQLException
-
rollback
Deprecated.- Specified by:
rollbackin interfaceConnection- Throws:
SQLException
-
releaseSavepoint
Deprecated.- Specified by:
releaseSavepointin interfaceConnection- Throws:
SQLException
-
createStatement
public ClickHouseStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Deprecated.- Specified by:
createStatementin interfaceClickHouseConnection- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
createNClob
Deprecated.- Specified by:
createNClobin interfaceConnection- Throws:
SQLException
-
isValid
Deprecated.- Specified by:
isValidin interfaceConnection- Throws:
SQLException
-
setClientInfo
Deprecated.- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
setClientInfo
Deprecated.- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
getClientInfo
Deprecated.- Specified by:
getClientInfoin interfaceConnection- Throws:
SQLException
-
getClientInfo
Deprecated.- Specified by:
getClientInfoin interfaceConnection- Throws:
SQLException
-
setSchema
Deprecated.- Specified by:
setSchemain interfaceConnection- Throws:
SQLException
-
getSchema
Deprecated.- Specified by:
getSchemain interfaceConnection- Throws:
SQLException
-
abort
Deprecated.- Specified by:
abortin interfaceConnection- Throws:
SQLException
-
setNetworkTimeout
Deprecated.- Specified by:
setNetworkTimeoutin interfaceConnection- Throws:
SQLException
-
getNetworkTimeout
Deprecated.- Specified by:
getNetworkTimeoutin interfaceConnection- Throws:
SQLException
-
getConfig
Deprecated.Description copied from interface:ClickHouseConnectionGets configuration tied to this connection.- Specified by:
getConfigin interfaceClickHouseConnection- Returns:
- non-null configuration
-
allowCustomSetting
public boolean allowCustomSetting()Deprecated.Description copied from interface:ClickHouseConnectionChecks whether custom setting is allowed or not.- Specified by:
allowCustomSettingin interfaceClickHouseConnection- Returns:
- true if custom setting is allowed; false otherwise
-
getCurrentDatabase
Deprecated.Description copied from interface:ClickHouseConnectionGets current database.Connection.getSchema()is similar but it will check if connection is closed or not hence may throwSQLException.- Specified by:
getCurrentDatabasein interfaceClickHouseConnection- Returns:
- non-null database name
-
setCurrentDatabase
Deprecated.Description copied from interface:ClickHouseConnectionSets current database.- Specified by:
setCurrentDatabasein interfaceClickHouseConnection- Parameters:
db- non-empty database namecheck- whether to check if the database exists or not- Throws:
SQLException- when failed to change current database
-
getCurrentUser
Deprecated.Description copied from interface:ClickHouseConnectionGets current user.- Specified by:
getCurrentUserin interfaceClickHouseConnection- Returns:
- non-null user name
-
getDefaultCalendar
Deprecated.Description copied from interface:ClickHouseConnectionGets default calendar which can be used to create timestamp.- Specified by:
getDefaultCalendarin interfaceClickHouseConnection- Returns:
- non-null calendar
-
getEffectiveTimeZone
Deprecated.Description copied from interface:ClickHouseConnectionGets effective time zone. WhenClickHouseConfig.isUseServerTimeZone()returnsfalse,ClickHouseConfig.getUseTimeZone()will be used as effective time zone, which will be used for reading and writing timestamp values.- Specified by:
getEffectiveTimeZonein interfaceClickHouseConnection- Returns:
- effective time zone
-
getJvmTimeZone
Deprecated.Description copied from interface:ClickHouseConnectionGets cached value ofTimeZone.getDefault().- Specified by:
getJvmTimeZonein interfaceClickHouseConnection- Returns:
- non-null cached JVM time zone
-
getServerTimeZone
Deprecated.Description copied from interface:ClickHouseConnectionGets server time zone, which is either same as result ofselect timezone(), or the overrided value fromClickHouseConfig.getServerTimeZone().- Specified by:
getServerTimeZonein interfaceClickHouseConnection- Returns:
- non-null server time zone
-
getServerVersion
Deprecated.Description copied from interface:ClickHouseConnectionGets server version.- Specified by:
getServerVersionin interfaceClickHouseConnection- Returns:
- non-null server version
-
getTransaction
Deprecated.Description copied from interface:ClickHouseConnectionGets current transaction.- Specified by:
getTransactionin interfaceClickHouseConnection- Returns:
- current transaction, which could be null
-
getUri
Deprecated.Description copied from interface:ClickHouseConnectionGets URI of the connection.- Specified by:
getUriin interfaceClickHouseConnection- Returns:
- URI of the connection
-
getJdbcConfig
Deprecated.Description copied from interface:ClickHouseConnectionGets JDBC-specific configuration.- Specified by:
getJdbcConfigin interfaceClickHouseConnection- Returns:
- non-null JDBC-specific configuration
-
getMaxInsertBlockSize
public long getMaxInsertBlockSize()Deprecated.Description copied from interface:ClickHouseConnectionGets 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.- Specified by:
getMaxInsertBlockSizein interfaceClickHouseConnection- Returns:
- value of max_insert_block_size
-
isTransactionSupported
public boolean isTransactionSupported()Deprecated.Description copied from interface:ClickHouseConnectionChecks whether transaction is supported.- Specified by:
isTransactionSupportedin interfaceClickHouseConnection- Returns:
- true if transaction is supported; false otherwise
-
isImplicitTransactionSupported
public boolean isImplicitTransactionSupported()Deprecated.Description copied from interface:ClickHouseConnectionChecks whether implicit transaction is supported.- Specified by:
isImplicitTransactionSupportedin interfaceClickHouseConnection- Returns:
- true if implicit transaction is supported; false otherwise
-
newQueryId
Deprecated.Description copied from interface:ClickHouseConnectionCreates a new query ID.- Specified by:
newQueryIdin interfaceClickHouseConnection- Returns:
- universal unique query ID
-
parse
public ClickHouseSqlStatement[] parse(String sql, ClickHouseConfig config, Map<String, Serializable> settings) Deprecated.Description copied from interface:ClickHouseConnectionParses the given sql.- Specified by:
parsein interfaceClickHouseConnection- Parameters:
sql- sql to parseconfig- configuration which might be used for parsing, could be nullsettings- server settings- Returns:
- non-null parsed sql statements
-
isWrapperFor
Deprecated.- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classJdbcWrapper- Throws:
SQLException
-
unwrap
Deprecated.- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classJdbcWrapper- Throws:
SQLException
-