本文整理汇总了Java中net.sf.jsqlparser.statement.truncate.Truncate类的典型用法代码示例。如果您正苦于以下问题:Java Truncate类的具体用法?Java Truncate怎么用?Java Truncate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Truncate类属于net.sf.jsqlparser.statement.truncate包,在下文中一共展示了Truncate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Truncate
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
final public Truncate Truncate() throws ParseException {Truncate truncate = new Truncate();
Table table;
Token tk = null;
tk = jj_consume_token(K_TRUNCATE);
if (tk.specialToken != null) {
truncate.setComment(tk.specialToken.image);
}
tk = jj_consume_token(K_TABLE);
if (tk.specialToken != null) {
truncate.setCommentTable(tk.specialToken.image);
}
table = Table();
truncate.setTable(table);
{if ("" != null) return truncate;}
throw new Error("Missing return statement in function");
}
示例2: plan
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的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;
}
示例3: isCachable
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的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;
}
示例4: buildTruncateStatement
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
private Statement buildTruncateStatement(String defaultTableSpace, Truncate truncate) throws StatementExecutionException {
if (truncate.getTable() == null) {
throw new StatementExecutionException("missing table name");
}
String tableSpace = truncate.getTable().getSchemaName();
if (tableSpace == null) {
tableSpace = defaultTableSpace;
}
String tableName = truncate.getTable().getName();
return new TruncateTableStatement(tableSpace, tableName);
}
示例5: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public synchronized void visit(Truncate 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: Truncate
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
final public Truncate Truncate() throws ParseException {
Truncate truncate = new Truncate();
Table table;
jj_consume_token(K_TRUNCATE);
jj_consume_token(K_TABLE);
table = Table();
truncate.setTable(table);
{if (true) return truncate;}
throw new Error("Missing return statement in function");
}
示例7: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
public void visit(Truncate truncate) {
SelectDeParser selectDeParser = new SelectDeParser();
selectDeParser.setBuffer(buffer);
ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeParser, buffer);
selectDeParser.setExpressionVisitor(expressionDeParser);
TruncateDeParser truncateDeParser = new TruncateDeParser(expressionDeParser, buffer);
truncateDeParser.deParse(truncate);
}
示例8: Truncate
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
final public Truncate Truncate() throws ParseException {
/* @bgen(jjtree) Truncate */
SimpleNode jjtn000 = new SimpleNode(JJTTRUNCATE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
Truncate truncate = new Truncate();
Table table;
try {
jj_consume_token(K_TRUNCATE);
jj_consume_token(K_TABLE);
table = Table();
truncate.setTable(table);
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
{
if (true)
return truncate;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
示例9: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public void visit(Truncate truncate) {
}
示例10: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public void visit(Truncate truncate) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
示例11: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
public void visit(Truncate truncate) {
throw new UnsupportedSQLFeatureException("Feature Truncate not supported");
}
示例12: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public void visit(Truncate truncate) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET); //To change body of generated methods, choose Tools | Templates.
}
示例13: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public void visit(Truncate s) {
visit(s.getTable());
}
示例14: visit
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的package包/类
@Override
public void visit(Truncate truncate)
{
throw new UnsupportedOperationException("Not supported yet.");
}
示例15: Statement
import net.sf.jsqlparser.statement.truncate.Truncate; //导入依赖的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");
}