修正测试

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@162 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-20 17:12:19 +00:00
parent f7fae74ac2
commit a4044e8e96
5 changed files with 21 additions and 21 deletions
@@ -41,37 +41,37 @@ public class MySqlSelectParser extends SQLSelectParser {
@Override
protected final String as() throws ParserException {
String rtnValue = null;
String alias = null;
if (lexer.token() == Token.AS) {
lexer.nextToken();
if (lexer.token() == Token.LITERAL_ALIAS) {
rtnValue = lexer.stringVal();
alias = '"' + lexer.stringVal() + '"';
lexer.nextToken();
return rtnValue;
return alias;
}
if (lexer.token() == Token.IDENTIFIER) {
rtnValue = lexer.stringVal();
alias = lexer.stringVal();
lexer.nextToken();
return rtnValue;
return alias;
}
throw new ParserException("Error", 0, 0);
}
if (lexer.token() == Token.LITERAL_ALIAS) {
rtnValue = lexer.stringVal();
alias = '"' + lexer.stringVal() + '"';
lexer.nextToken();
} else if (lexer.token() == Token.IDENTIFIER) {
rtnValue = lexer.stringVal();
alias = lexer.stringVal();
lexer.nextToken();
} else if (lexer.token() == Token.LITERAL_CHARS) {
rtnValue = "'" + lexer.stringVal() + "'";
alias = "'" + lexer.stringVal() + "'";
lexer.nextToken();
}
return rtnValue;
return alias;
}
@Override