OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlDropServer.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.SqlDrop;
6 import org.apache.calcite.sql.SqlKind;
7 import org.apache.calcite.sql.SqlNode;
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 SqlDropServer extends SqlDrop implements JsonSerializableDdl {
18  private static final SqlOperator OPERATOR =
19  new SqlSpecialOperator("DROP_SERVER", SqlKind.OTHER_DDL);
20 
21  @Expose
22  private boolean ifExists;
23  @Expose
24  private String serverName;
25  @Expose
26  private String command;
27 
28  public SqlDropServer(
29  final SqlParserPos pos, final boolean ifExists, final String serverName) {
30  super(OPERATOR, pos, ifExists);
31  this.ifExists = ifExists;
32  this.serverName = serverName;
33  this.command = OPERATOR.getName();
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 }
SqlDropServer(final SqlParserPos pos, final boolean ifExists, final String serverName)