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