Package com.clickhouse.jdbc

# Class JdbcConfig

java.lang.Object
com.clickhouse.jdbc.JdbcConfig

public class JdbcConfig extends Object
JDBC-specific configuration.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`PROP_AUTO_COMMIT`
`static final String`
`PROP_CONTINUE_BATCH`
`static final String`
`PROP_CREATE_DATABASE`
`static final String`
`PROP_DIALECT`
`static final String`
`PROP_FETCH_SIZE`
`static final String`
`PROP_JDBC_COMPLIANT`
`static final String`
`PROP_NAMED_PARAM`
`static final String`
`PROP_NULL_AS_DEFAULT`
`static final String`
`PROP_TX_SUPPORT`
`static final String`
`PROP_TYPE_MAP`
`static final String`
`PROP_WRAPPER_OBJ`

## Constructor Summary

Constructors
Constructor
Description
`JdbcConfig()`
`JdbcConfig(Properties props)`

## Method Summary

Modifier and Type
Method
Description
`JdbcTypeMapping`
`getDialect()`
Gets JDBC dialect.
`static List<DriverPropertyInfo>`
`getDriverProperties()`
`int`
`getFetchSize()`
Gets default fetch size for query.
`int`
`getNullAsDefault()`
Gets default approach to handle null value.
`Map<String,Class<?>>`
`getTypeMap()`
Gets custom type map.
`boolean`
`isAutoCommit()`
Checks whether auto commit should be enabled when creating a connection.
`boolean`
`isContinueBatchOnError()`
Checks whether batch processing should continue when error occurred.
`boolean`
`isCreateDbIfNotExist()`
Checks whether database should be created automatically when it does not exist.
`boolean`
`isJdbcCompliant()`
Checks whether JDBC-complaint mode is enabled or not.
`boolean`
`isTransactionSupported()`
Checks whether transaction support is enabled or not.
`boolean`
`useNamedParameter()`
Checks whether named parameter should be used instead of JDBC standard question mark placeholder.
`boolean`
`useWrapperObject()`
Checks whether `Array` and `Struct` should be returned for array and tuple when calling `ResultSet.getObject(int)`.

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

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

## Field Details

### PROP_AUTO_COMMIT

public static final String PROP_AUTO_COMMIT

See Also:
  - Constant Field Values

### PROP_CREATE_DATABASE

public static final String PROP_CREATE_DATABASE

See Also:
  - Constant Field Values

### PROP_CONTINUE_BATCH

public static final String PROP_CONTINUE_BATCH

See Also:
  - Constant Field Values

### PROP_DIALECT

public static final String PROP_DIALECT

See Also:
  - Constant Field Values

### PROP_FETCH_SIZE

public static final String PROP_FETCH_SIZE

See Also:
  - Constant Field Values

### PROP_JDBC_COMPLIANT

public static final String PROP_JDBC_COMPLIANT

See Also:
  - Constant Field Values

### PROP_NAMED_PARAM

public static final String PROP_NAMED_PARAM

See Also:
  - Constant Field Values

### PROP_NULL_AS_DEFAULT

public static final String PROP_NULL_AS_DEFAULT

See Also:
  - Constant Field Values

### PROP_TX_SUPPORT

public static final String PROP_TX_SUPPORT

See Also:
  - Constant Field Values

### PROP_TYPE_MAP

public static final String PROP_TYPE_MAP

See Also:
  - Constant Field Values

### PROP_WRAPPER_OBJ

public static final String PROP_WRAPPER_OBJ

See Also:
  - Constant Field Values

## Constructor Details

### JdbcConfig

public JdbcConfig()

### JdbcConfig

public JdbcConfig(Properties props)

## Method Details

### getDriverProperties

public static List<DriverPropertyInfo> getDriverProperties()

### isAutoCommit

public boolean isAutoCommit()
Checks whether auto commit should be enabled when creating a connection.

Returns:
  true if auto commit should be enabled when creating connection; false otherwise

### isCreateDbIfNotExist

public boolean isCreateDbIfNotExist()
Checks whether database should be created automatically when it does not exist.

Returns:
  true if database should be created automatically; false otherwise

### isContinueBatchOnError

public boolean isContinueBatchOnError()
Checks whether batch processing should continue when error occurred.

Returns:
  true if should continue; false to throw exception and abort execution

### getFetchSize

public int getFetchSize()
Gets default fetch size for query.

Returns:
  default fetch size for query

### getDialect

public JdbcTypeMapping getDialect()
Gets JDBC dialect.

Returns:
  non-null JDBC dialect

### getTypeMap

public Map<String,Class<?>> getTypeMap()
Gets custom type map.

Returns:
  non-null custom type map

### isJdbcCompliant

public boolean isJdbcCompliant()
Checks whether JDBC-complaint mode is enabled or not.

Returns:
  true if JDBC-complaint mode is enabled; false otherwise

### isTransactionSupported

public boolean isTransactionSupported()
Checks whether transaction support is enabled or not.

Returns:
  true if transaction support is enabled; false otherwise

### getNullAsDefault

public int getNullAsDefault()
Gets default approach to handle null value.

Returns:
  0 or negative to throw exception, 1 to disable the null-check, and 2 to reset null to default value of corresponding data type

### useNamedParameter

public boolean useNamedParameter()
Checks whether named parameter should be used instead of JDBC standard question mark placeholder.

Returns:
  true if named parameter should be used; false otherwise

### useWrapperObject

public boolean useWrapperObject()
Checks whether `Array` and `Struct` should be returned for array and tuple when calling `ResultSet.getObject(int)`.

Returns:
  true if wrapper object should be returned instead of array / tuple; false otherwise