OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlDropRole.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 
3 import com.google.gson.annotations.Expose;
4 import com.mapd.parser.extension.ddl.heavysql.*;
5 
6 import org.apache.calcite.sql.*;
7 import org.apache.calcite.sql.parser.SqlParserPos;
8 
9 import java.util.List;
10 
14 public class SqlDropRole extends SqlDrop implements JsonSerializableDdl {
15  private static final SqlOperator OPERATOR =
16  new SqlSpecialOperator("DROP_ROLE", SqlKind.OTHER_DDL);
17 
18  @Expose
19  private boolean ifExists;
20  @Expose
21  private String role;
22  @Expose
23  private String command;
24 
25  public SqlDropRole(SqlParserPos pos, final boolean ifExists, String role) {
26  super(OPERATOR, pos, ifExists);
27  this.role = role;
28  this.command = OPERATOR.getName();
29  this.ifExists = ifExists;
30  }
31 
32  @Override
33  public List<SqlNode> getOperandList() {
34  return null;
35  }
36 
37  @Override
38  public String toString() {
39  return toJsonString();
40  }
41 }
SqlDropRole(SqlParserPos pos, final boolean ifExists, String role)