Search in sources :

Example 1 with MySqlOptimizeStatement

use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlOptimizeStatement in project druid by alibaba.

the class MySqlStatementParser method parseOptimize.

public MySqlOptimizeStatement parseOptimize() {
    accept(Token.OPTIMIZE);
    accept(Token.TABLE);
    MySqlOptimizeStatement stmt = new MySqlOptimizeStatement();
    List<SQLName> names = new ArrayList<SQLName>();
    this.exprParser.names(names, stmt);
    for (SQLName name : names) {
        stmt.addTableSource(new SQLExprTableSource(name));
    }
    return stmt;
}
Also used : MySqlOptimizeStatement(com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlOptimizeStatement) ArrayList(java.util.ArrayList) SQLName(com.alibaba.druid.sql.ast.SQLName)

Aggregations

SQLName (com.alibaba.druid.sql.ast.SQLName)1 MySqlOptimizeStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlOptimizeStatement)1 ArrayList (java.util.ArrayList)1