Package com.clickhouse.jdbc
Interface ClickHouseConnection
- All Superinterfaces:
AutoCloseable,Connection,Wrapper
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Checks whether custom setting is allowed or not.voidbegin()Deprecated.Starts a new transaction.default ClickHouseArraycreateArrayOf(String typeName, Object[] elements) Deprecated.default ClickHouseBlobDeprecated.default ClickHouseClobDeprecated.default ClickHouseXmlDeprecated.default ClickHouseStatementDeprecated.default ClickHouseStatementcreateStatement(int resultSetType, int resultSetConcurrency) Deprecated.createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) Deprecated.default ClickHouseStructcreateStruct(String typeName, Object[] attributes) Deprecated.Deprecated.Gets configuration tied to this connection.Deprecated.Gets current database.Deprecated.Gets current user.Deprecated.Gets default calendar which can be used to create timestamp.Deprecated.Gets effective time zone.Deprecated.Gets JDBC-specific configuration.default JdbcTypeMappingDeprecated.Gets JDBC type mapping.Deprecated.Gets cached value ofTimeZone.getDefault().longDeprecated.Gets max insert block size.Deprecated.Gets server time zone, which is either same as result ofselect timezone(), or the overrided value fromClickHouseConfig.getServerTimeZone().Deprecated.Gets server version.Deprecated.Gets current transaction.getUri()Deprecated.Gets URI of the connection.booleanDeprecated.Checks whether implicit transaction is supported.booleanDeprecated.Checks whether transaction is supported.Deprecated.Creates a new query ID.default com.clickhouse.jdbc.parser.ClickHouseSqlStatement[]parse(String sql, ClickHouseConfig config) Deprecated.com.clickhouse.jdbc.parser.ClickHouseSqlStatement[]parse(String sql, ClickHouseConfig config, Map<String, Serializable> settings) Deprecated.Parses the given sql.default CallableStatementprepareCall(String sql) Deprecated.default CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency) Deprecated.default CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Deprecated.default PreparedStatementprepareStatement(String sql) Deprecated.default PreparedStatementprepareStatement(String sql, int autoGeneratedKeys) Deprecated.default PreparedStatementprepareStatement(String sql, int[] columnIndexes) Deprecated.default PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency) Deprecated.default PreparedStatementprepareStatement(String sql, String[] columnNames) Deprecated.voidsetCurrentDatabase(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, setTypeMapMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
COLUMN_ELEMENT
Deprecated.- See Also:
-
COLUMN_ARRAY
Deprecated.- See Also:
-
PROP_APPLICATION_NAME
Deprecated.- See Also:
-
PROP_CUSTOM_HTTP_HEADERS
Deprecated.- See Also:
-
PROP_CUSTOM_HTTP_PARAMS
Deprecated.- See Also:
-
-
Method Details
-
createArrayOf
Deprecated.- Specified by:
createArrayOfin interfaceConnection- Throws:
SQLException
-
createBlob
Deprecated.- Specified by:
createBlobin interfaceConnection- Throws:
SQLException
-
createClob
Deprecated.- Specified by:
createClobin interfaceConnection- Throws:
SQLException
-
createStruct
Deprecated.- Specified by:
createStructin interfaceConnection- Throws:
SQLException
-
createSQLXML
Deprecated.- Specified by:
createSQLXMLin interfaceConnection- Throws:
SQLException
-
createStatement
Deprecated.- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
createStatement
default ClickHouseStatement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException Deprecated.- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
createStatement
ClickHouseStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Deprecated.- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareCall
Deprecated.- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareCall
default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Deprecated.- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareCall
default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Deprecated.- Specified by:
prepareCallin interfaceConnection- Throws:
SQLException
-
prepareStatement
Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
default PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Deprecated.- Specified by:
prepareStatementin interfaceConnection- Throws:
SQLException
-
begin
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 throwSQLException.- Returns:
- non-null database name
-
setCurrentDatabase
Deprecated.Sets current database.- Parameters:
database- non-empty database namecheck- 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
Deprecated.Gets 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.- Returns:
- effective time zone
-
getJvmTimeZone
TimeZone getJvmTimeZone()Deprecated.Gets cached value ofTimeZone.getDefault().- Returns:
- non-null cached JVM time zone
-
getServerTimeZone
TimeZone getServerTimeZone()Deprecated.Gets server time zone, which is either same as result ofselect timezone(), or the overrided value fromClickHouseConfig.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
Deprecated.Gets JDBC type mapping. Same asgetJdbcConfig().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 useparse(String, ClickHouseConfig, Map)insteadParses the given sql.- Parameters:
sql- sql to parseconfig- 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 parseconfig- configuration which might be used for parsing, could be nullsettings- server settings- Returns:
- non-null parsed sql statements
-
parse(String, ClickHouseConfig, Map)instead