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 StringPROP_AUTO_COMMITstatic StringPROP_CONTINUE_BATCHstatic StringPROP_FETCH_SIZEstatic StringPROP_JDBC_COMPLIANTstatic StringPROP_NAMED_PARAMstatic StringPROP_TYPE_MAPstatic StringPROP_WRAPPER_OBJ
-
Constructor Summary
Constructors Constructor Description JdbcConfig()JdbcConfig(Properties props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<DriverPropertyInfo>getDriverProperties()intgetFetchSize()Gets default fetch size for query.Map<String,Class<?>>getTypeMap()Gets custom type map.booleanisAutoCommit()Checks whether auto commit should be enabled when creating a connection.booleanisContinueBatchOnError()Checks whether batch processing should continue when error occurred.booleanisJdbcCompliant()Checks whether JDBC-complaint mode is enabled or not.booleanuseNamedParameter()Checks whether named parameter should be used instead of JDBC standard question mark placeholder.booleanuseWrapperObject()Checks whetherArrayandStructshould be returned for array and tuple when callingResultSet.getObject(int).
-
-
-
Field Detail
-
PROP_AUTO_COMMIT
public static final String PROP_AUTO_COMMIT
- See Also:
- Constant Field Values
-
PROP_CONTINUE_BATCH
public static final String PROP_CONTINUE_BATCH
- 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_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 Detail
-
JdbcConfig
public JdbcConfig()
-
JdbcConfig
public JdbcConfig(Properties props)
-
-
Method Detail
-
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
-
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
-
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
-
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 whetherArrayandStructshould be returned for array and tuple when callingResultSet.getObject(int).- Returns:
- true if wrapper object should be returned instead of array / tuple; false otherwise
-
-