Package com.alibaba.wasp.plan

Examples of com.alibaba.wasp.plan.ShowTablesPlan


   *
   */
  private void getShowTablesPlan(ParseContext context,
      WaspSqlShowTablesStatement sqlShowTablesStatement,
      MetaEventOperation metaEventOperation) throws IOException {
    ShowTablesPlan showTables = null;
    SQLExpr like = sqlShowTablesStatement.getLike();
    SQLExpr where = sqlShowTablesStatement.getWhere();
    if (like == null && where == null) {
      showTables = new ShowTablesPlan(ShowTablesPlan.ShowTablesType.ALL);
    } else if (like != null) {
      showTables = new ShowTablesPlan(ShowTablesPlan.ShowTablesType.LIKE);
      String likePattern = parseString(like);
      showTables.setLikePattern(likePattern);
    } else if (where != null) {
      throw new UnsupportedException("Show tables where not Unsupported!");
    }
    context.setPlan(showTables);
    LOG.debug("ShowTablesPlan " + showTables.toString());
  }
View Full Code Here


   *
   */
  private void getShowCreateTablePlan(ParseContext context,
      WaspSqlShowCreateTableStatement sqlShowCreateTableStatement,
      MetaEventOperation metaEventOperation) throws IOException {
    ShowTablesPlan showTables = new ShowTablesPlan(ShowTablesPlan.ShowTablesType.CREATE);
    SQLExpr name = sqlShowCreateTableStatement.getName();
    String tablename = parseName(name);
    // check if table exists and get Table info
    metaEventOperation.checkAndGetTable(tablename, true);

    showTables.setTablename(tablename);
    context.setPlan(showTables);
    LOG.debug("ShowTablesPlan " + showTables.toString());
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.plan.ShowTablesPlan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.