public class ClickHouseConnection extends Object implements SQLConnection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Modifier | Constructor and Description |
|---|---|
protected |
ClickHouseConnection(ClickHouseConfig cfg,
NativeContext nativeCtx) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, getClientInfo, getClientInfo, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setSavepoint, setSavepointisWrapperFor, unwrapprotected ClickHouseConnection(ClickHouseConfig cfg, NativeContext nativeCtx)
public ClickHouseConfig cfg()
public NativeContext.ServerContext serverContext()
public NativeContext.ClientContext clientContext()
public void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface SQLConnectionsetAutoCommit in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
getAutoCommit in interface SQLConnectiongetAutoCommit in interface ConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface SQLConnectioncommit in interface ConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface SQLConnectionrollback in interface ConnectionSQLExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface SQLConnectionsetReadOnly in interface ConnectionSQLExceptionpublic boolean isReadOnly()
throws SQLException
isReadOnly in interface SQLConnectionisReadOnly in interface ConnectionSQLExceptionpublic Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap in interface SQLConnectiongetTypeMap in interface ConnectionSQLExceptionpublic void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap in interface SQLConnectionsetTypeMap in interface ConnectionSQLExceptionpublic void setHoldability(int holdability)
throws SQLException
setHoldability in interface SQLConnectionsetHoldability in interface ConnectionSQLExceptionpublic int getHoldability()
throws SQLException
getHoldability in interface SQLConnectiongetHoldability in interface ConnectionSQLExceptionpublic void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
setNetworkTimeout in interface SQLConnectionsetNetworkTimeout in interface ConnectionSQLExceptionpublic int getNetworkTimeout()
throws SQLException
getNetworkTimeout in interface SQLConnectiongetNetworkTimeout in interface ConnectionSQLExceptionpublic void abort(Executor executor) throws SQLException
abort in interface SQLConnectionabort in interface ConnectionSQLExceptionpublic void close()
throws SQLException
close in interface SQLConnectionclose in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface SQLConnectionisClosed in interface ConnectionSQLExceptionpublic Statement createStatement() throws SQLException
createStatement in interface SQLConnectioncreateStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String query) throws SQLException
prepareStatement in interface SQLConnectionprepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface SQLConnectionprepareStatement in interface ConnectionSQLExceptionpublic void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo in interface SQLConnectionsetClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo in interface SQLConnectionsetClientInfo in interface ConnectionSQLClientInfoExceptionpublic Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf in interface SQLConnectioncreateArrayOf in interface ConnectionSQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct in interface SQLConnectioncreateStruct in interface ConnectionSQLExceptionpublic boolean isValid(int timeout)
throws SQLException
isValid in interface SQLConnectionisValid in interface ConnectionSQLExceptionpublic void setSchema(String schema) throws SQLException
setSchema in interface SQLConnectionsetSchema in interface ConnectionSQLException@Nullable public String getSchema() throws SQLException
getSchema in interface SQLConnectiongetSchema in interface ConnectionSQLExceptionpublic void setCatalog(String catalog) throws SQLException
setCatalog in interface SQLConnectionsetCatalog in interface ConnectionSQLExceptionpublic String getCatalog() throws SQLException
getCatalog in interface SQLConnectiongetCatalog in interface ConnectionSQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface SQLConnectionsetTransactionIsolation in interface ConnectionSQLExceptionpublic int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface SQLConnectiongetTransactionIsolation in interface ConnectionSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface SQLConnectiongetWarnings in interface ConnectionSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface SQLConnectionclearWarnings in interface ConnectionSQLExceptionpublic DatabaseMetaData getMetaData() throws SQLException
getMetaData in interface SQLConnectiongetMetaData in interface ConnectionSQLExceptionpublic boolean ping(Duration timeout) throws SQLException
SQLExceptionpublic Block getSampleBlock(String insertQuery) throws SQLException
SQLExceptionpublic QueryResult sendQueryRequest(String query, ClickHouseConfig cfg) throws SQLException
SQLExceptionpublic int sendInsertRequest(Block block) throws SQLException
SQLExceptionpublic static ClickHouseConnection createClickHouseConnection(ClickHouseConfig configure) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.