OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlRenameDB.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.io.*;
13 import java.util.List;
14 
18 public class SqlRenameDB extends SqlDdl implements JsonSerializableDdl {
19  private static final SqlOperator OPERATOR =
20  new SqlSpecialOperator("RENAME_DB", SqlKind.OTHER_DDL);
21 
22  @Expose
23  private String command;
24  @Expose
25  private String name;
26  @Expose
27  private String newName;
28 
29  public SqlRenameDB(final SqlParserPos pos, String name, String newName) {
30  super(OPERATOR, pos);
31  this.command = OPERATOR.getName();
32  this.name = name;
33  this.newName = newName;
34  }
35 
36  @Override
37  public List<SqlNode> getOperandList() {
38  return null;
39  }
40 
41  @Override
42  public String toString() {
43  return toJsonString();
44  }
45 }
SqlRenameDB(final SqlParserPos pos, String name, String newName)