本文整理汇总了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() : "");
}
示例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()));
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例9: visit
import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) {
DropDeParser dropDeParser = new DropDeParser(buffer);
dropDeParser.deParse(drop);
}
示例10: visit
import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
示例11: visit
import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
public void visit(Drop drop) {
throw new UnsupportedSQLFeatureException("Feature Drop not supported");
}
示例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.
}
示例13: visit
import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop s) {
visit(s.getName());
}
示例14: visit
import net.sf.jsqlparser.statement.drop.Drop; //导入依赖的package包/类
@Override
public void visit(Drop drop)
{
throw new UnsupportedOperationException("Not supported yet.");
}
示例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");
}