mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for postgresql. for issue #2281
This commit is contained in:
@@ -88,13 +88,21 @@ public class PGExprParser extends SQLExprParser {
|
||||
|
||||
public SQLExpr primary() {
|
||||
if (lexer.token() == Token.ARRAY) {
|
||||
SQLArrayExpr array = new SQLArrayExpr();
|
||||
array.setExpr(new SQLIdentifierExpr(lexer.stringVal()));
|
||||
String ident = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
accept(Token.LBRACKET);
|
||||
this.exprList(array.getValues(), array);
|
||||
accept(Token.RBRACKET);
|
||||
return primaryRest(array);
|
||||
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
SQLIdentifierExpr array = new SQLIdentifierExpr(ident);
|
||||
return this.methodRest(array, true);
|
||||
} else {
|
||||
SQLArrayExpr array = new SQLArrayExpr();
|
||||
array.setExpr(new SQLIdentifierExpr(ident));
|
||||
accept(Token.LBRACKET);
|
||||
this.exprList(array.getValues(), array);
|
||||
accept(Token.RBRACKET);
|
||||
return primaryRest(array);
|
||||
}
|
||||
|
||||
} else if (lexer.token() == Token.POUND) {
|
||||
lexer.nextToken();
|
||||
if (lexer.token() == Token.LBRACE) {
|
||||
|
||||
Reference in New Issue
Block a user