Package com.clickhouse.jdbc
Class ClickHouseDriver
- java.lang.Object
-
- com.clickhouse.jdbc.ClickHouseDriver
-
- All Implemented Interfaces:
Driver
public class ClickHouseDriver extends Object implements Driver
JDBC driver for ClickHouse. It takes a connection string like below for connecting to ClickHouse server:jdbc:clickhouse://[<user>:<password>@]<server>[:<port>][/<db>][?parameter1=value1¶meter2=value2]For examples:
jdbc:clickhouse://localhost:8123/systemjdbc:clickhouse://admin:password@localhost/system?socket_time=30jdbc:clickhouse://localhost/system?protocol=grpc
-
-
Constructor Summary
Constructors Constructor Description ClickHouseDriver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsURL(String url)ClickHouseConnectionconnect(String url, Properties info)intgetMajorVersion()intgetMinorVersion()LoggergetParentLogger()DriverPropertyInfo[]getPropertyInfo(String url, Properties info)booleanjdbcCompliant()static Map<ClickHouseOption,Serializable>toClientOptions(Properties props)
-
-
-
Method Detail
-
toClientOptions
public static Map<ClickHouseOption,Serializable> toClientOptions(Properties props)
-
acceptsURL
public boolean acceptsURL(String url) throws SQLException
- Specified by:
acceptsURLin interfaceDriver- Throws:
SQLException
-
connect
public ClickHouseConnection connect(String url, Properties info) throws SQLException
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
- Specified by:
getPropertyInfoin interfaceDriver- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersionin interfaceDriver
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersionin interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliantin interfaceDriver
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
-