当前位置: 首页>>代码示例>>Java>>正文


Java Drop类代码示例

本文整理汇总了Java中net.sf.jsqlparser.statement.drop.Drop的典型用法代码示例。如果您正苦于以下问题:Java Drop类的具体用法?Java Drop怎么用?Java Drop使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Drop类属于net.sf.jsqlparser.statement.drop包,在下文中一共展示了Drop类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deParse

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public void deParse(Drop aDrop) {
    buffer.append(aDrop.getComment() != null ? aDrop.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append("Drop")
            .append(aDrop.getTypeComment() != null ? " " + aDrop.getTypeComment() + ExpressionDeParser.LINE_SEPARATOR : "").append(" ")
            .append(aDrop.getType()).append(" ")
            .append(aDrop.getNameComment() != null ? " " + aDrop.getNameComment() + ExpressionDeParser.LINE_SEPARATOR : "")
            .append(aDrop.getName()).append(" ");
    if (aDrop.getParameters() != null && aDrop.getParameters().size() > 0) {
        for (int i = 0; i < aDrop.getParameters().size(); i++) {
            buffer.append(aDrop.getParameters().get(i)).append(" ");
            if (i < aDrop.getParameters().size() - 1) {
                buffer.append(!"".equals(aDrop.getParametersComment().get(i)) ? " " + aDrop.getParametersComment().get(i) + ExpressionDeParser.LINE_SEPARATOR : "")
                        .append(", ");
            }
        }
    }
    buffer.append(!"".equals(aDrop.getEndComment()) ? " " + aDrop.getEndComment() : "");
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:18,代码来源:DropDeParser.java

示例2: deParse

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public void deParse(Drop drop) {
    buffer.append("DROP ");
    buffer.append(drop.getType());
    if (drop.isIfExists())
        buffer.append(" IF EXISTS");

    buffer.append(" ").append(drop.getName());
    
    if (drop.getParameters() != null && !drop.getParameters().isEmpty()) {
        buffer.append(" ").append(PlainSelect.getStringList(drop.getParameters()));
    }
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:13,代码来源:DropDeParser.java

示例3: plan

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public ExecutionPlan plan(String defaultTableSpace, net.sf.jsqlparser.statement.Statement stmt,
    boolean scan, boolean returnValues, int maxRows) {
    verifyJdbcParametersIndexes(stmt);
    ExecutionPlan result;
    if (stmt instanceof CreateTable) {
        result = ExecutionPlan.simple(buildCreateTableStatement(defaultTableSpace, (CreateTable) stmt));
    } else if (stmt instanceof CreateIndex) {
        result = ExecutionPlan.simple(buildCreateIndexStatement(defaultTableSpace, (CreateIndex) stmt));
    } else if (stmt instanceof Insert) {
        result = buildInsertStatement(defaultTableSpace, (Insert) stmt, returnValues);
    } else if (stmt instanceof Delete) {
        result = buildDeleteStatement(defaultTableSpace, (Delete) stmt, returnValues);
    } else if (stmt instanceof Update) {
        result = buildUpdateStatement(defaultTableSpace, (Update) stmt, returnValues);
    } else if (stmt instanceof Select) {
        result = buildSelectStatement(defaultTableSpace, (Select) stmt, scan, maxRows);
    } else if (stmt instanceof Execute) {
        result = ExecutionPlan.simple(buildExecuteStatement(defaultTableSpace, (Execute) stmt));
    } else if (stmt instanceof Alter) {
        result = ExecutionPlan.simple(buildAlterStatement(defaultTableSpace, (Alter) stmt));
    } else if (stmt instanceof Drop) {
        result = ExecutionPlan.simple(buildDropStatement(defaultTableSpace, (Drop) stmt));
    } else if (stmt instanceof Truncate) {
        result = ExecutionPlan.simple(buildTruncateStatement(defaultTableSpace, (Truncate) stmt));
    } else {
        return null;
    }
    return result;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:31,代码来源:SQLPlanner.java

示例4: isCachable

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
private static boolean isCachable(net.sf.jsqlparser.statement.Statement stmt) {
    if (stmt instanceof Execute) {
        return false;
    } else if (stmt instanceof Alter) {
        return false;
    } else if (stmt instanceof Drop) {
        return false;
    } else if (stmt instanceof Truncate) {
        return false;
    }
    return true;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:13,代码来源:SQLPlanner.java

示例5: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public synchronized void visit(Drop arg0) {
   controlEventMap.put(sql, null);
   targetMap.put(sql, null);
   insUpdColumnsMap.put(sql, new ArrayList<SqlParameter>());
   parameterMap.put(sql, new LinkedList<SqlParameter>());
   emptyPrimaryKey(SqlParameterType.WHERE_PARAMETER);
}
 
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:9,代码来源:SqlParser.java

示例6: parse

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public Set<String> parse(Drop drop) {
	
	Set<String> tableSet = new HashSet<String>();
	
	if (drop != null) {
		Table table = drop.getName();
		if (table != null) {
			tableSet.add(table.getName());
		}
	}
	return tableSet;
}
 
开发者ID:PinaeOS,项目名称:timon,代码行数:13,代码来源:DropParser.java

示例7: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public void visit(Drop drop) {
    SelectDeParser selectDeParser = new SelectDeParser();
    selectDeParser.setBuffer(buffer);
    ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeParser, buffer);
    selectDeParser.setExpressionVisitor(expressionDeParser);
    DropDeParser dropDeParser = new DropDeParser(expressionDeParser, buffer);
    dropDeParser.deParse(drop);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:StatementDeParser.java

示例8: testComment

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Test
public void testComment() throws JSQLParserException {
    String statement =
            "/*90053*/ DROP /*erlgjter*/ TABLE /*weweporwepr*/ mytab /*wekljrhs*/ CAS /*erpuppwe*/ MAS /*eiortouei*/";
    Drop drop = (Drop) parserManager.parse(new StringReader(statement));
    assertEquals(statement, "" + drop);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:8,代码来源:DropTest.java

示例9: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) {
    DropDeParser dropDeParser = new DropDeParser(buffer);
    dropDeParser.deParse(drop);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:6,代码来源:StatementDeParser.java

示例10: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) {
    throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:TablesNamesFinder.java

示例11: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public void visit(Drop drop) {
    throw new UnsupportedSQLFeatureException("Feature Drop not supported");
}
 
开发者ID:adamkewley,项目名称:jobson,代码行数:4,代码来源:AllColumnRefsFinder.java

示例12: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) {
    throw new UnsupportedOperationException(NOT_SUPPORTED_YET); //To change body of generated methods, choose Tools | Templates.
}
 
开发者ID:justice-code,项目名称:QiuQiu,代码行数:5,代码来源:ReplaceTablesNamesFinder.java

示例13: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop s) {
    visit(s.getName());
}
 
开发者ID:diennea,项目名称:herddb,代码行数:5,代码来源:JdbcQueryRewriter.java

示例14: visit

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) 
{
    throw new UnsupportedOperationException("Not supported yet.");
}
 
开发者ID:sogou-biztech,项目名称:compass,代码行数:6,代码来源:TableRenameVisitor.java

示例15: Statement

import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
final public Statement Statement() throws ParseException {
Statement stm = null;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case K_DROP:
  case K_WITH:
  case K_DELETE:
  case K_CREATE:
  case K_SELECT:
  case K_INSERT:
  case K_UPDATE:
  case K_REPLACE:
  case K_TRUNCATE:
  case 80:
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_WITH:
    case K_SELECT:
    case 80:
      stm = Select();
      break;
    case K_UPDATE:
      stm = Update();
      break;
    case K_INSERT:
      stm = Insert();
      break;
    case K_DELETE:
      stm = Delete();
      break;
    case K_REPLACE:
      stm = Replace();
      break;
    case K_CREATE:
      stm = CreateTable();
      break;
    case K_DROP:
      stm = Drop();
      break;
    case K_TRUNCATE:
      stm = Truncate();
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 77:
      jj_consume_token(77);
      break;
    default:
      jj_la1[1] = jj_gen;
      ;
    }
    break;
  case 0:
    jj_consume_token(0);
    break;
  default:
    jj_la1[2] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  {if (true) return stm;}
  throw new Error("Missing return statement in function");
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:66,代码来源:CCJSqlParser.java


注:本文中的net.sf.jsqlparser.statement.drop.Drop类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。