mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
remove keyword : DAY、MONTH、HOUR、MINUTE、SECOND
This commit is contained in:
@@ -353,10 +353,10 @@ public class OracleExprParser extends SQLExprParser {
|
||||
expr = dblink;
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.DAY || lexer.token() == Token.YEAR) {
|
||||
if (identifierEquals("DAY") || identifierEquals("YEAR")) {
|
||||
lexer.mark();
|
||||
|
||||
String name = lexer.token().name;
|
||||
String name = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() == Token.COMMA) {
|
||||
@@ -380,7 +380,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
}
|
||||
|
||||
accept(Token.TO);
|
||||
if (lexer.token() == Token.SECOND) {
|
||||
if (identifierEquals("SECOND")) {
|
||||
lexer.nextToken();
|
||||
interval.setToType(OracleIntervalType.SECOND);
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
@@ -677,7 +677,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
lexer.nextToken();
|
||||
|
||||
|
||||
OracleIntervalType type = OracleIntervalType.valueOf(lexer.token().name);
|
||||
OracleIntervalType type = OracleIntervalType.valueOf(lexer.stringVal());
|
||||
interval.setType(type);
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -702,7 +702,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
|
||||
if (lexer.token() == Token.TO) {
|
||||
accept(Token.TO);
|
||||
if (lexer.token() == Token.SECOND) {
|
||||
if (identifierEquals("SECOND")) {
|
||||
lexer.nextToken();
|
||||
interval.setToType(OracleIntervalType.SECOND);
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
|
||||
@@ -100,12 +100,7 @@ public class OracleLexer extends Lexer {
|
||||
map.put("COLUMN", Token.COLUMN);
|
||||
|
||||
map.put("CURSOR", Token.CURSOR);
|
||||
|
||||
map.put("DAY", Token.DAY);
|
||||
map.put("YEAR", Token.YEAR);
|
||||
map.put("MONTH", Token.MONTH);
|
||||
map.put("MINUTE", Token.MINUTE);
|
||||
map.put("SECOND", Token.SECOND);
|
||||
|
||||
map.put("TO", Token.TO);
|
||||
map.put("MODEL", Token.MODEL);
|
||||
map.put("MERGE", Token.MERGE);
|
||||
|
||||
Reference in New Issue
Block a user