Package de.chojo.sqlutil.jdbc
Class MariaDbJdbc
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> MariaDbJdbcaddParameter(String key, V value) Add a new parameter to the urlPermit loading data from fileAllow multi-queries likeinsert into ab (i) values (1); insert into ab (i) valuesallowMultiQueries(boolean state) Allow multi-queries likeinsert into ab (i) values (1); insert into ab (i) valuesconnectTimeout(int millis) The connect timeout value, in milliseconds, or zero for no timeout.protected StringReturns the full path of the driver classdriver()Returns the driver name of the jdbc urldumpQueriesOnException(boolean state) If set to 'true', an exception is thrown during query execution containing a query string.enabledSslCipherSuites(String ciphers) Force TLS/SSL cipher (comma separated list).File path of the keyStore file that contain client private key store and associate certificates (similar to java System property "javax.net.ssl.keyStore", but ensure that only the private key's entries are used).keyStorePassword(String password) Password for the client certificate keyStore (similar to java System property "javax.net.ssl.keyStorePassword").keyStoreType(String type) Indicate key store type (JKS/PKCS12).maxQuerySizeToLog(int maxQuerySizeToLog) Only the first characters corresponding to this options size will be displayed in logs Default: 1024.serverSslCert(String path) Permits providing server's certificate in DER form, or server's CA certificate.sslMode(MariaDbJdbc.SslMode sslMode) Enables SSL/TLS in a specific mode.PrepareStatement are prepared on the server side before executing.Methods inherited from class de.chojo.sqlutil.jdbc.RemoteJdbcConfig
baseUrl, database, host, ipv4, ipv6, localhost, login, password, port, port, userMethods inherited from class de.chojo.sqlutil.jdbc.JdbcConfig
driverClass, jdbcUrl, parameter, self, setDriverClass, setDriverClass, setDriverClass
-
Constructor Details
-
MariaDbJdbc
public MariaDbJdbc()
-
-
Method Details
-
driver
Description copied from class:JdbcConfigReturns the driver name of the jdbc url- Specified by:
driverin classJdbcConfig<MariaDbJdbc>- Returns:
- driver
-
connectTimeout
The connect timeout value, in milliseconds, or zero for no timeout. Default: 30 000.- Parameters:
millis- milliseconds- Returns:
- builder instance
-
useServerPrepStmts
PrepareStatement are prepared on the server side before executing. The applications that repeatedly use the same queries have value to activate this option, but the general case is to use the direct command (text protocol).- Returns:
- builder instance
-
allowLocalInfile
Permit loading data from file- Returns:
- builder instance
-
sslMode
Enables SSL/TLS in a specific mode.This option replaces the deprecated options: disableSslHostnameVerification, trustServerCertificate, useSsl
- Parameters:
sslMode- ssl mode. DefaultMariaDbJdbc.SslMode.DISABLE- Returns:
- builder instance
-
serverSslCert
Permits providing server's certificate in DER form, or server's CA certificate. The server will be added to trustStor. This permits a self-signed certificate to be trusted.Can be used in one of 2 forms :
- serverSslCert=/path/to/cert.pem (full path to certificate)
- serverSslCert=classpath:relative/cert.pem (relative to current classpath
- Parameters:
path- vert path- Returns:
- builder instance
-
keyStore
File path of the keyStore file that contain client private key store and associate certificates (similar to java System property "javax.net.ssl.keyStore", but ensure that only the private key's entries are used).- Parameters:
path- path- Returns:
- builder instance
-
keyStorePassword
Password for the client certificate keyStore (similar to java System property "javax.net.ssl.keyStorePassword").- Parameters:
password- password- Returns:
- builder instance
-
enabledSslCipherSuites
Force TLS/SSL cipher (comma separated list).Example : "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"
Default: use JRE ciphers.
- Parameters:
ciphers- ciphers- Returns:
- builder instance
-
keyStoreType
Indicate key store type (JKS/PKCS12). default is null, then using java default type.- Parameters:
type- type- Returns:
- builder instance
-
maxQuerySizeToLog
Only the first characters corresponding to this options size will be displayed in logs Default: 1024.- Parameters:
maxQuerySizeToLog- size- Returns:
- builder instance
-
allowMultiQueries
Allow multi-queries likeinsert into ab (i) values (1); insert into ab (i) values- Parameters:
state- state. Default: false- Returns:
- builder instance
-
allowMultiQueries
Allow multi-queries likeinsert into ab (i) values (1); insert into ab (i) values- Returns:
- builder instance
-
dumpQueriesOnException
If set to 'true', an exception is thrown during query execution containing a query string.- Parameters:
state- state. Default: false- Returns:
- builder instance
-
addParameter
Add a new parameter to the url- Overrides:
addParameterin classJdbcConfig<MariaDbJdbc>- Type Parameters:
V- value type- Parameters:
key- keyvalue- value- Returns:
- builder instance
- See Also:
-
defaultDriverClass
Description copied from class:JdbcConfigReturns the full path of the driver class- Specified by:
defaultDriverClassin classJdbcConfig<MariaDbJdbc>- Returns:
- driver class
-