Class MariaDbDialect

All Implemented Interfaces:
JdbcDialect

public class MariaDbDialect extends MySqlDialect
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 Details

    • DFLT_FETCH_SIZE

      public static final int DFLT_FETCH_SIZE
      Fetch size used for streaming result sets.

      Before MariaDB Connector/J 1.4.0 the only accepted value was Statement.setFetchSize(Integer.MIN_VALUE) (equivalent to Statement.setFetchSize(1)), which MySqlDialect still uses. That value is accepted by the driver for compatibility only; JDBC requires a value >= 0, so use 1.

      See Also:
  • Constructor Details

    • MariaDbDialect

      public MariaDbDialect()
      Creates a dialect with the recommended fetch size of DFLT_FETCH_SIZE for streaming result sets.
    • MariaDbDialect

      public MariaDbDialect(int fetchSize)
      Creates a dialect with an explicit fetch size.
      Parameters:
      fetchSize - Fetch size passed to JDBC Statement.setFetchSize for load cache queries.