Class MySQLAdapter

  • All Implemented Interfaces:
    DatastoreAdapter

    public class MySQLAdapter
    extends BaseDatastoreAdapter
    Provides methods for adapting SQL language elements to the MySQL database. Note that this also currently supports the MariaDB database. We could contemplate splitting this into separate MySQL and MariaDB support at some point, but one of the issues to overcome with that is that "datanucleus-geospatial" adds support for Geospatial types, including MySQL types and extends this class. We would need to have an equivalent extension for MariaDB.
    • Field Detail

      • NONSQL92_RESERVED_WORDS

        public static final String NONSQL92_RESERVED_WORDS
        A string containing the list of MySQL keywords that are not also SQL/92 reserved words, separated by commas. This list is normally obtained dynamically from the driver using DatabaseMetaData.getSQLKeywords(), but MySQL drivers are known to return an incomplete list.

        This list was produced based on the reserved word list in the MySQL Manual (Version 4.0.10-gamma) at http://www.mysql.com/doc/en/Reserved_words.html.

        See Also:
        Constant Field Values
    • Constructor Detail

      • MySQLAdapter

        public MySQLAdapter​(DatabaseMetaData metadata)
        Constructor. Overridden so we can add on our own list of NON SQL92 reserved words which is returned incorrectly with the JDBC driver.
        Parameters:
        metadata - MetaData for the DB