mirror of https://github.com/apache/openjpa.git
OPENJPA-2868 fix invalidColumnNames for MySQL
This commit is contained in:
parent
8f959cc3a5
commit
b99e2dba29
|
@ -133,26 +133,33 @@ public class MySQLDictionary
|
|||
|
||||
// reservedWordSet subset that CANNOT be used as valid column names
|
||||
// (i.e., without surrounding them with double-quotes)
|
||||
invalidColumnWordSet.addAll(Arrays.asList(new String[]{
|
||||
"ADD", "ALL", "ALTER", "AND", "AS", "ASC", "BETWEEN", "BINARY",
|
||||
"BLOB", "BOTH", "BY", "CASCADE", "CASE", "CHANGE", "CHAR",
|
||||
"CHARACTER", "CHECK", "COLLATE", "COLUMN", "CONSTRAINT", "CONTINUE",
|
||||
"CONVERT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME",
|
||||
"CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "DEC", "DECIMAL",
|
||||
"DECLARE", "DEFAULT", "DELETE", "DESC", "DESCRIBE", "DISTINCT",
|
||||
"DOUBLE", "DROP", "ELSE", "END-EXEC", "EXISTS", "FALSE", "FETCH",
|
||||
"FLOAT", "FLOAT4", "FOR", "FOREIGN", "FROM", "GRANT", "GROUP",
|
||||
"HAVING", "IN", "INFILE", "INNER", "INSENSITIVE", "INSERT", "INT",
|
||||
"INT1", "INT2", "INT4", "INTEGER", "INTERVAL", "INTO", "IS", "JOIN",
|
||||
"KEY", "LEADING", "LEFT", "LIKE", "LOAD", "MATCH", "MEDIUMINT",
|
||||
"NATURAL", "NOT", "NULL", "NUMERIC", "ON", "OPTION", "OR", "ORDER",
|
||||
"OUTER", "OUTFILE", "PRECISION", "PRIMARY", "PROCEDURE", "READ",
|
||||
"REAL", "REFERENCES", "REPLACE", "RESTRICT", "REVOKE", "RIGHT",
|
||||
"SCHEMA", "SELECT", "SET", "SMALLINT", "SQL", "SQLSTATE",
|
||||
"STARTING", "TABLE", "THEN", "TO", "TRAILING", "TRUE", "UNION",
|
||||
"UNIQUE", "UNSIGNED", "UPDATE", "USAGE", "USING", "VALUES",
|
||||
"VARCHAR", "VARYING", "WHEN", "WHERE", "WITH", "WRITE", "ZEROFILL",
|
||||
"INDEX",
|
||||
// generated at 2021-05-02T15:40:16.383 via org.apache.openjpa.reservedwords.ReservedWordsIT
|
||||
invalidColumnWordSet.addAll(Arrays.asList(new String[] {
|
||||
"ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", "ASENSITIVE", "BEFORE", "BETWEEN", "BIGINT", "BINARY",
|
||||
"BLOB", "BOTH", "BY", "CALL", "CASCADE", "CASE", "CHANGE", "CHAR", "CHARACTER", "CHECK", "COLLATE", "COLUMN", "CONDITION",
|
||||
"CONSTRAINT", "CONTINUE", "CONVERT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER",
|
||||
"CURSOR", "DATABASE", "DATABASES", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE", "DAY_SECOND", "DEC", "DECIMAL",
|
||||
"DECLARE", "DEFAULT", "DELAYED", "DELETE", "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT", "DISTINCTROW", "DIV",
|
||||
"DOUBLE", "DROP", "DUAL", "EACH", "ELSE", "ELSEIF", "ENCLOSED", "END-EXEC", "ESCAPED", "EXISTS", "EXIT", "EXPLAIN",
|
||||
"FALSE", "FETCH", "FLOAT", "FLOAT4", "FLOAT8", "FOR", "FORCE", "FOREIGN", "FROM", "FULLTEXT", "GENERATED", "GET",
|
||||
"GRANT", "GROUP", "HAVING", "HIGH_PRIORITY", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IF", "IGNORE",
|
||||
"IN", "INDEX", "INFILE", "INNER", "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2", "INT3", "INT4", "INT8",
|
||||
"INTEGER", "INTERVAL", "INTO", "IS", "ITERATE", "JOIN", "KEY", "KEYS", "KILL", "LEADING", "LEAVE", "LEFT", "LIKE",
|
||||
"LIMIT", "LINES", "LOAD", "LOCALTIME", "LOCALTIMESTAMP", "LOCK", "LONG", "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY",
|
||||
"MATCH", "MAXVALUE", "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIDDLEINT", "MINUTE_MICROSECOND", "MINUTE_SECOND",
|
||||
"MOD", "MODIFIES", "NATURAL", "NO_WRITE_TO_BINLOG", "NOT", "NULL", "NUMERIC", "ON", "OPTIMIZE", "OPTION", "OPTIONALLY",
|
||||
"OR", "ORDER", "OUT", "OUTER", "OUTFILE", "PARTITION", "PRECISION", "PRIMARY", "PROCEDURE", "PURGE", "RANGE", "READ",
|
||||
"READS", "REAL", "REFERENCES", "REGEXP", "RELEASE", "RENAME", "REPEAT", "REPLACE", "REQUIRE", "RESIGNAL", "RESTRICT",
|
||||
"RETURN", "REVOKE", "RIGHT", "RLIKE", "SCHEMA", "SCHEMAS", "SECOND_MICROSECOND", "SENSITIVE", "SEPARATOR", "SET",
|
||||
"SHOW", "SIGNAL", "SMALLINT", "SPATIAL", "SPECIFIC", "SQL", "SQL_BIG_RESULT", "SQL_CALC_FOUND_ROWS", "SQL_SMALL_RESULT",
|
||||
"SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "SSL", "STARTING", "STRAIGHT_JOIN", "TABLE", "TERMINATED", "THEN", "TINYBLOB",
|
||||
"TINYINT", "TINYTEXT", "TO", "TRAILING", "TRIGGER", "TRUE", "UNDO", "UNION", "UNIQUE", "UNLOCK", "UNSIGNED", "UPDATE",
|
||||
"USAGE", "USE", "USING", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALUES", "VARBINARY", "VARCHAR", "VARCHARACTER",
|
||||
"VARYING", "WHEN", "WHERE", "WHILE", "WITH", "WRITE", "XOR", "YEAR_MONTH", "ZEROFILL",
|
||||
// end generated.
|
||||
// the following keywords used to be defined as reserved words in the past, but now seem to work
|
||||
// we still add them for compat reasons
|
||||
"INDEX", "SELECT"
|
||||
}));
|
||||
|
||||
requiresSearchStringEscapeForLike = true;
|
||||
|
|
Loading…
Reference in New Issue