Search in sources :

Example 1 with ShowIndex

use of com.alibaba.cobar.parser.ast.stmt.dal.ShowIndex in project cobar by alibaba.

the class MySQLDALParser method showIndex.

private ShowIndex showIndex(ShowIndex.Type type) throws SQLSyntaxErrorException {
    lexer.nextToken();
    match(KW_FROM, KW_IN);
    Identifier tempId = identifier();
    if (lexer.token() == KW_FROM || lexer.token() == KW_IN) {
        lexer.nextToken();
        Identifier tempId2 = identifier();
        return new ShowIndex(type, tempId, tempId2);
    }
    return new ShowIndex(type, tempId);
}
Also used : Identifier(com.alibaba.cobar.parser.ast.expression.primary.Identifier) ShowIndex(com.alibaba.cobar.parser.ast.stmt.dal.ShowIndex)

Aggregations

Identifier (com.alibaba.cobar.parser.ast.expression.primary.Identifier)1 ShowIndex (com.alibaba.cobar.parser.ast.stmt.dal.ShowIndex)1