rzo1 commented on code in PR #302:
URL: https://github.com/apache/openjpa/pull/302#discussion_r4547775664


##########
openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java:
##########
@@ -1043,4 +1044,51 @@ public boolean getResolveConverterTypeHierarchy() {
     public void setResolveConverterTypeHierarchy(boolean b) {
         _resolveConverterTypeHierarchy = b;
     }
+
+    /**
+     * Whether the MySQL and MariaDB dictionaries use the reserved words of
+     * the current servers and delimit them on MariaDB too. Defaults to true:
+     * <ul>
+     * <li><code>MySQLDictionary</code> treats the words that MySQL 8.0 and

Review Comment:
   Done in 5fb440803: the Compatibility Javadoc is now short and generic, the 
database specific details stay in the dictionaries.



##########
openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java:
##########
@@ -1043,4 +1044,51 @@ public boolean getResolveConverterTypeHierarchy() {
     public void setResolveConverterTypeHierarchy(boolean b) {
         _resolveConverterTypeHierarchy = b;
     }
+
+    /**
+     * Whether the MySQL and MariaDB dictionaries use the reserved words of
+     * the current servers and delimit them on MariaDB too. Defaults to true:
+     * <ul>
+     * <li><code>MySQLDictionary</code> treats the words that MySQL 8.0 and
+     * later reserve, such as <code>RANK</code>, <code>WINDOW</code> or
+     * <code>SYSTEM</code>, and the invalid column words that MySQL reserves
+     * in a table name too, such as <code>NTILE</code>, <code>DUAL</code> or
+     * <code>LIMIT</code>, as reserved words.</li>
+     * <li><code>MariaDBDictionary</code> treats the words that MariaDB
+     * reserves, such as <code>LINEAR</code>, <code>OFFSET</code>,
+     * <code>RETURNING</code> or <code>LIMIT</code>, and the names of
+     * built-in functions it reserves in a table name under the
+     * <code>IGNORE_SPACE</code> SQL mode, such as <code>NTILE</code> or
+     * <code>RANK</code>, as reserved words.</li>
+     * <li>Both delimit a table, column or other name that is a reserved word
+     * with back ticks and keep it, where <code>MariaDBDictionary</code>
+     * appended a <code>0</code> before, e.g. <code>ORDER0</code>. A column
+     * <code>LIMIT0</code> becomes <code>limit</code>, and a delimited
+     * default table name keeps the case of the entity name. The names built
+     * from such a name, such as default join tables and join columns, change
+     * alike, e.g. <code>ORDER0_ITEMS</code> becomes
+     * <code>Order_items</code>.</li>
+     * </ul>
+     * Set to false to keep the names and the SQL that an earlier release
+     * generated before this change for a schema that is still used under its
+     * original names: on MariaDB those of the reserved words, with no name
+     * delimited, as in OpenJPA 4.1.x apart from the other 4.2 changes to the
+     * reserved words; on MySQL those of the words added here, while the words
+     * that were reserved before are still delimited.
+     *
+     * @since 4.2.0
+     */
+    public boolean getUpdatedMySQLAndMariaDBReservedWords() {

Review Comment:
   Done in 5fb440803: renamed to `UpdatedReservedWords` 
(`_updatedReservedWords`), so other dictionaries can use the same option 
instead of one per database.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to