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


Java Truncate类代码示例

本文整理汇总了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");
  }
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:17,代码来源:CCJSqlParser.java

示例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;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:31,代码来源:SQLPlanner.java

示例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;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:13,代码来源:SQLPlanner.java

示例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);
    }
 
开发者ID:diennea,项目名称:herddb,代码行数:14,代码来源:SQLPlanner.java

示例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);
}
 
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:9,代码来源:SqlParser.java

示例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");
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:11,代码来源:CCJSqlParser.java

示例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);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:StatementDeParser.java

示例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");
  }
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:49,代码来源:CCJSqlParser.java

示例9: visit

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

示例10: visit

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

示例11: visit

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

示例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.
}
 
开发者ID:justice-code,项目名称:QiuQiu,代码行数:5,代码来源:ReplaceTablesNamesFinder.java

示例13: visit

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

示例14: visit

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

示例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");
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:66,代码来源:CCJSqlParser.java


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