public class MariadbTargetDriverDialect extends GenericTargetDriverDialect
ALLOWED_ON_CLOSED_METHODS, NETWORK_BOUND_METHODS_FOR_ENTIRE_RESULTSET| Constructor and Description |
|---|
MariadbTargetDriverDialect() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAllowedOnConnectionMethodNames() |
@Nullable java.lang.String |
getSQLQueryString(java.sql.PreparedStatement ps) |
boolean |
isDialect(java.sql.Driver driver) |
boolean |
isDialect(java.lang.String dataSourceClass) |
boolean |
isDriverRegistered() |
ConnectInfo |
prepareConnectInfo(@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props) |
void |
prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props) |
java.lang.String |
prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.lang.String url,
@NonNull java.util.Properties props)
MariaDB Connector/J data sources accept only
url, user, password and
loginTimeout as bean properties, so every other setting has to be expressed as a URL
parameter. |
void |
registerDriver() |
abortConnection, findSQLQueryString, getEncryptedBytes, getNetworkBoundMethodNames, getSQLState, ping, registerDataType, setEncryptedParameter, updateInternalStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveHostSelectionPropertiespublic boolean isDialect(java.sql.Driver driver)
isDialect in interface TargetDriverDialectisDialect in class GenericTargetDriverDialectpublic boolean isDialect(java.lang.String dataSourceClass)
isDialect in interface TargetDriverDialectisDialect in class GenericTargetDriverDialectpublic ConnectInfo prepareConnectInfo(@NonNull java.lang.String protocol, @NonNull HostSpec hostSpec, @NonNull java.util.Properties props) throws java.sql.SQLException
prepareConnectInfo in interface TargetDriverDialectprepareConnectInfo in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic void prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull java.lang.String protocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props)
throws java.sql.SQLException
prepareDataSource in interface TargetDriverDialectprepareDataSource in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic java.lang.String prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.lang.String url,
@NonNull java.util.Properties props)
url, user, password and
loginTimeout as bean properties, so every other setting has to be expressed as a URL
parameter. Two adjustments are made:
permitMysqlScheme is added for a jdbc:mysql:// URL. The driver rejects the
MySQL scheme outright ("Wrong mariaDB url") unless the URL itself carries this parameter,
and it cannot be set as a bean property.allowPublicKeyRetrieval or sslMode). Without this they would
be dropped, because the data source has no bean setter for them. This mirrors what the
non-XA data source path does through the connection URL builder.Credentials are deliberately kept out of the URL; they are applied through the
setUser / setPassword bean setters.
dataSource - the target driver data source being configured.url - the target driver URL, with AWS Wrapper parameters already removed.props - the effective connection properties, including AWS Wrapper properties.public boolean isDriverRegistered()
throws java.sql.SQLException
isDriverRegistered in interface TargetDriverDialectisDriverRegistered in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic void registerDriver()
throws java.sql.SQLException
registerDriver in interface TargetDriverDialectregisterDriver in class GenericTargetDriverDialectjava.sql.SQLExceptionpublic java.util.Set<java.lang.String> getAllowedOnConnectionMethodNames()
getAllowedOnConnectionMethodNames in interface TargetDriverDialectgetAllowedOnConnectionMethodNames in class GenericTargetDriverDialectpublic @Nullable java.lang.String getSQLQueryString(java.sql.PreparedStatement ps)
getSQLQueryString in interface TargetDriverDialectgetSQLQueryString in class GenericTargetDriverDialect