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