HHH-12741 Register new reserved words added in MySQL 8.0

https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-new-8-0-A
This commit is contained in:
Yanming Zhou 2018-06-27 17:28:36 +08:00 committed by Guillaume Smet
parent b3e0d363bd
commit 0a4a609a42
1 changed files with 20 additions and 0 deletions

View File

@ -13,6 +13,26 @@ import org.hibernate.LockOptions;
*/ */
public class MySQL8Dialect extends MySQL57Dialect { public class MySQL8Dialect extends MySQL57Dialect {
public MySQL8Dialect() {
registerKeyword("CUME_DIST");
registerKeyword("DENSE_RANK");
registerKeyword("EMPTY");
registerKeyword("EXCEPT");
registerKeyword("FIRST_VALUE");
registerKeyword("GROUPS");
registerKeyword("JSON_TABLE");
registerKeyword("LAG");
registerKeyword("LAST_VALUE");
registerKeyword("LEAD");
registerKeyword("NTH_VALUE");
registerKeyword("NTILE");
registerKeyword("PERSIST");
registerKeyword("PERCENT_RANK");
registerKeyword("PERSIST_ONLY");
registerKeyword("RANK");
registerKeyword("ROW_NUMBER");
}
@Override @Override
public String getWriteLockString(int timeout) { public String getWriteLockString(int timeout) {
if ( timeout == LockOptions.NO_WAIT ) { if ( timeout == LockOptions.NO_WAIT ) {