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

Public Member Functions

 SqlGrantRole (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 20 of file SqlGrantRole.java.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 37 of file SqlGrantRole.java.

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

Definition at line 42 of file SqlGrantRole.java.

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

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

Member Data Documentation

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

Definition at line 21 of file SqlGrantRole.java.

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

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

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