OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlTruncateTable.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 
3 import com.google.gson.annotations.Expose;
4 
5 import org.apache.calcite.sql.SqlDdl;
6 import org.apache.calcite.sql.SqlKind;
7 import org.apache.calcite.sql.SqlNode;
8 import org.apache.calcite.sql.SqlOperator;
9 import org.apache.calcite.sql.SqlSpecialOperator;
10 import org.apache.calcite.sql.parser.SqlParserPos;
11 
12 import java.util.List;
13 
17 public class SqlTruncateTable extends SqlDdl implements JsonSerializableDdl {
18  private static final SqlOperator OPERATOR =
19  new SqlSpecialOperator("TRUNCATE_TABLE", SqlKind.OTHER_DDL);
20 
21  @Expose
22  private String tableName;
23  @Expose
24  private String command;
25 
26  public SqlTruncateTable(final SqlParserPos pos, final String tableName) {
27  super(OPERATOR, pos);
28  this.tableName = tableName;
29  this.command = OPERATOR.getName();
30  }
31 
32  @Override
33  public List<SqlNode> getOperandList() {
34  return null;
35  }
36 
37  @Override
38  public String toString() {
39  return toJsonString();
40  }
41 }
SqlTruncateTable(final SqlParserPos pos, final String tableName)