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:(ch|clickhouse)[:<protocol>]://[<user>[:<password>]@]<host>[:<port>][/<db>][?<parameter=value>,[<parameter=value]]][#<tag>[,<tag>]]`

For examples:

- `jdbc:clickhouse://localhost:8123/system`
- `jdbc:clickhouse://admin:password@localhost/system?socket_time=30`
- `jdbc:clickhouse://localhost/system?protocol=grpc`

## Constructor Summary

Constructors
Constructor
Description
`ClickHouseDriver()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`acceptsURL(String url)`
`ClickHouseConnection`
`connect(String url, Properties info)`
`int`
`getMajorVersion()`
`int`
`getMinorVersion()`
`Logger`
`getParentLogger()`
`DriverPropertyInfo[]`
`getPropertyInfo(String url, Properties info)`
`boolean`
`jdbcCompliant()`
`static Map<com.clickhouse.config.ClickHouseOption,Serializable>`
`toClientOptions(Properties props)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ClickHouseDriver

public ClickHouseDriver()

## Method Details

### toClientOptions

public static Map<com.clickhouse.config.ClickHouseOption,Serializable> toClientOptions(Properties props)

### acceptsURL

public boolean acceptsURL(String url) throws SQLException

Specified by:
  `acceptsURL` in interface `Driver`
Throws:
  `SQLException`

### connect

public ClickHouseConnection connect(String url, Properties info) throws SQLException

Specified by:
  `connect` in interface `Driver`
Throws:
  `SQLException`

### getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException

Specified by:
  `getPropertyInfo` in interface `Driver`
Throws:
  `SQLException`

### getMajorVersion

public int getMajorVersion()

Specified by:
  `getMajorVersion` in interface `Driver`

### getMinorVersion

public int getMinorVersion()

Specified by:
  `getMinorVersion` in interface `Driver`

### jdbcCompliant

public boolean jdbcCompliant()

Specified by:
  `jdbcCompliant` in interface `Driver`

### getParentLogger

public Logger getParentLogger() throws SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `Driver`
Throws:
  `SQLFeatureNotSupportedException`