OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.parser.extension.ddl.SqlRevokeRole Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.SqlRevokeRole:
+ Collaboration diagram for com.mapd.parser.extension.ddl.SqlRevokeRole:

Public Member Functions

 SqlRevokeRole (SqlParserPos pos, SqlNodeList roles, SqlNodeList grantees)
 
List< SqlNode > getOperandList ()
 
String toString ()
 

Private Attributes

SqlNodeList roles
 
SqlNodeList grantees
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Definition at line 19 of file SqlRevokeRole.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlRevokeRole.SqlRevokeRole ( SqlParserPos  pos,
SqlNodeList  roles,
SqlNodeList  grantees 
)
inline

Member Function Documentation

List<SqlNode> com.mapd.parser.extension.ddl.SqlRevokeRole.getOperandList ( )
inline

Definition at line 36 of file SqlRevokeRole.java.

36  {
37  return null;
38  }
String com.mapd.parser.extension.ddl.SqlRevokeRole.toString ( )
inline

Definition at line 41 of file SqlRevokeRole.java.

References com.mapd.parser.extension.ddl.SqlRevokeRole.grantees, and com.mapd.parser.extension.ddl.SqlRevokeRole.roles.

41  {
42  EscapedStringJsonBuilder jsonBuilder = new EscapedStringJsonBuilder();
43  Map<String, Object> map = jsonBuilder.map();
44 
45  if (this.roles != null) {
46  List<Object> roles_list = jsonBuilder.list();
47  for (SqlNode role : this.roles) {
48  roles_list.add(role.toString());
49  }
50  map.put("roles", roles_list);
51  }
52 
53  if (this.grantees != null) {
54  List<Object> grantee_list = jsonBuilder.list();
55  for (SqlNode grantee : this.grantees) {
56  grantee_list.add(grantee.toString());
57  }
58  map.put("grantees", grantee_list);
59  }
60 
61  map.put("command", "REVOKE_ROLE");
62  Map<String, Object> payload = jsonBuilder.map();
63  payload.put("payload", map);
64  return jsonBuilder.toJsonString(payload);
65  }

Member Data Documentation

SqlNodeList com.mapd.parser.extension.ddl.SqlRevokeRole.grantees
private
final SqlOperator com.mapd.parser.extension.ddl.SqlRevokeRole.OPERATOR
staticprivate
Initial value:
=
new SqlSpecialOperator("REVOKE_ROLE", SqlKind.OTHER_DDL)

Definition at line 20 of file SqlRevokeRole.java.

Referenced by com.mapd.parser.extension.ddl.SqlRevokeRole.SqlRevokeRole().

SqlNodeList com.mapd.parser.extension.ddl.SqlRevokeRole.roles
private

The documentation for this class was generated from the following file: