Package com.clickhouse.jdbc
Class JdbcConfig
java.lang.Object
com.clickhouse.jdbc.JdbcConfig
JDBC-specific configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets database term.Gets JDBC dialect.static List<DriverPropertyInfo>intGets default fetch size for query.intGets default approach to handle null value.Gets properties.Gets custom type map.booleanChecks whether auto commit should be enabled when creating a connection.booleanChecks whether batch processing should continue when error occurred.booleanChecks whether database should be created automatically when it does not exist.booleanChecks whether external database is supported or not.booleanChecks whether JDBC-complaint mode is enabled or not.booleanChecks whether transaction support is enabled or not.booleanChecks whether to use catalog as synonymous to database.booleanChecks whether to use local file for INFILE/OUTFILE.booleanChecks whether named parameter should be used instead of JDBC standard question mark placeholder.booleanChecks whether to use schema as synonymous to database.booleanChecks whetherArrayandStructshould be returned for array and tuple when callingResultSet.getObject(int).
-
Field Details
-
PROP_AUTO_COMMIT
- See Also:
-
PROP_CREATE_DATABASE
- See Also:
-
PROP_CONTINUE_BATCH
- See Also:
-
PROP_DATABASE_TERM
- See Also:
-
PROP_DIALECT
- See Also:
-
PROP_EXTERNAL_DATABASE
- See Also:
-
PROP_FETCH_SIZE
- See Also:
-
PROP_LOCAL_FILE
- See Also:
-
PROP_JDBC_COMPLIANT
- See Also:
-
PROP_NAMED_PARAM
- See Also:
-
PROP_NULL_AS_DEFAULT
- See Also:
-
PROP_TX_SUPPORT
- See Also:
-
PROP_TYPE_MAP
- See Also:
-
PROP_WRAPPER_OBJ
- See Also:
-
-
Constructor Details
-
JdbcConfig
public JdbcConfig() -
JdbcConfig
-
-
Method Details
-
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
-
useLocalFile
public boolean useLocalFile()Checks whether to use local file for INFILE/OUTFILE.- Returns:
- true to use local file for INFILE/OUTFILE; false otherwise
-
getDatabaseTerm
Gets database term.- Returns:
- non-null database term
-
useCatalog
public boolean useCatalog()Checks whether to use catalog as synonymous to database.- Returns:
- true if use catalog as synonymous to database; false otherwise
-
useSchema
public boolean useSchema()Checks whether to use schema as synonymous to database.- Returns:
- true if use schema as synonymous to database; false otherwise
-
getDialect
Gets JDBC dialect.- Returns:
- non-null JDBC dialect
-
isExternalDatabaseSupported
public boolean isExternalDatabaseSupported()Checks whether external database is supported or not.- Returns:
- true if external database is supported; false otherwise
-
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 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
-
getProperties
Gets properties.- Returns:
- non-null properties
-