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