use of com.alibaba.druid.sql.dialect.mysql.ast.MySqlUseIndexHint in project druid by alibaba.
the class MySqlSelectIntoParser method parseTableSourceRest.
protected SQLTableSource parseTableSourceRest(SQLTableSource tableSource) {
if (identifierEquals("USING")) {
return tableSource;
}
if (lexer.token() == Token.USE) {
lexer.nextToken();
MySqlUseIndexHint hint = new MySqlUseIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
if (identifierEquals("IGNORE")) {
lexer.nextToken();
MySqlIgnoreIndexHint hint = new MySqlIgnoreIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
if (identifierEquals("FORCE")) {
lexer.nextToken();
MySqlForceIndexHint hint = new MySqlForceIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
return super.parseTableSourceRest(tableSource);
}
use of com.alibaba.druid.sql.dialect.mysql.ast.MySqlUseIndexHint in project druid by alibaba.
the class MySqlSelectParser method parseTableSourceRest.
protected SQLTableSource parseTableSourceRest(SQLTableSource tableSource) {
if (identifierEquals("USING")) {
return tableSource;
}
if (lexer.token() == Token.USE) {
lexer.nextToken();
MySqlUseIndexHint hint = new MySqlUseIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
if (identifierEquals("IGNORE")) {
lexer.nextToken();
MySqlIgnoreIndexHint hint = new MySqlIgnoreIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
if (identifierEquals("FORCE")) {
lexer.nextToken();
MySqlForceIndexHint hint = new MySqlForceIndexHint();
parseIndexHint(hint);
tableSource.getHints().add(hint);
}
if (lexer.token() == Token.PARTITION) {
lexer.nextToken();
accept(Token.LPAREN);
this.exprParser.names(((SQLExprTableSource) tableSource).getPartitions(), tableSource);
accept(Token.RPAREN);
}
return super.parseTableSourceRest(tableSource);
}
Aggregations