return expr;
}
public SQLAssignItem parseAssignItem() {
SQLAssignItem item = new SQLAssignItem();
SQLExpr var = primary();
String ident = null;
if (var instanceof SQLIdentifierExpr) {
ident = ((SQLIdentifierExpr) var).getName();
if ("GLOBAL".equalsIgnoreCase(ident)) {
ident = lexer.stringVal();
lexer.nextToken();
var = new SQLVariantRefExpr(ident, true);
} else if ("SESSION".equalsIgnoreCase(ident)) {
ident = lexer.stringVal();
lexer.nextToken();
var = new SQLVariantRefExpr(ident, false);
} else {
var = new SQLVariantRefExpr(ident);
}
}
if ("NAMES".equalsIgnoreCase(ident)) {
// skip
} else if ("CHARACTER".equalsIgnoreCase(ident)) {
var = new SQLIdentifierExpr("CHARACTER SET");
accept(Token.SET);
if (lexer.token() == Token.EQ) {
lexer.nextToken();
}
} else {
if (lexer.token() == Token.COLONEQ) {
lexer.nextToken();
} else {
accept(Token.EQ);
}
}
item.setValue(this.expr());
item.setTarget(var);
return item;
}