Class MariaDbDialect
java.lang.Object
org.gridgain.cache.store.jdbc.dialect.BasicJdbcDialect
org.gridgain.cache.store.jdbc.dialect.MySqlDialect
org.gridgain.cache.store.jdbc.dialect.MariaDbDialect
- All Implemented Interfaces:
JdbcDialect
A dialect compatible with the MariaDB database.
Inherits merge support (INSERT ... ON DUPLICATE KEY UPDATE) and backtick identifier escaping from
MySqlDialect, and overrides the default fetch size with a JDBC-spec-compliant non-negative value suitable for the
MariaDB Connector/J driver.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFetch size used for streaming result sets.Fields inherited from class org.gridgain.cache.store.jdbc.dialect.BasicJdbcDialect
DFLT_MAX_PARAMS_CNT, fetchSize, maxParamsCnt -
Constructor Summary
ConstructorsConstructorDescriptionCreates a dialect with the recommended fetch size ofDFLT_FETCH_SIZEfor streaming result sets.MariaDbDialect(int fetchSize) Creates a dialect with an explicit fetch size. -
Method Summary
Methods inherited from class org.gridgain.cache.store.jdbc.dialect.MySqlDialect
escape, hasMerge, loadCacheSelectRangeQuery, mergeQueryMethods inherited from class org.gridgain.cache.store.jdbc.dialect.BasicJdbcDialect
getFetchSize, getMaxParameterCount, insertQuery, loadCacheQuery, loadCacheRangeQuery, loadQuery, mkString, mkString, mkString, removeQuery, repeat, setFetchSize, setMaxParameterCount, updateQuery
-
Field Details
-
DFLT_FETCH_SIZE
public static final int DFLT_FETCH_SIZEFetch size used for streaming result sets.Before MariaDB Connector/J 1.4.0 the only accepted value was
Statement.setFetchSize(Integer.MIN_VALUE)(equivalent toStatement.setFetchSize(1)), whichMySqlDialectstill uses. That value is accepted by the driver for compatibility only; JDBC requires a value>= 0, so use1.
-
-
Constructor Details
-
MariaDbDialect
public MariaDbDialect()Creates a dialect with the recommended fetch size ofDFLT_FETCH_SIZEfor streaming result sets. -
MariaDbDialect
public MariaDbDialect(int fetchSize) Creates a dialect with an explicit fetch size.- Parameters:
fetchSize- Fetch size passed to JDBCStatement.setFetchSizefor load cache queries.
-