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

Public Member Functions

List< SqlNode > getOperandList ()
 
void unparse (SqlWriter writer, int leftPrec, int rightPrec)
 
String toString ()
 

Public Attributes

final SqlIdentifier role
 

Package Functions

 SqlCreateRole (SqlParserPos pos, SqlIdentifier role)
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Parse tree for

CREATE ROLE

statement.

Definition at line 42 of file SqlCreateRole.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlCreateRole.SqlCreateRole ( SqlParserPos  pos,
SqlIdentifier  role 
)
inlinepackage

Creates a SqlCreateRole.

Definition at line 49 of file SqlCreateRole.java.

References com.mapd.parser.extension.ddl.SqlCreateRole.OPERATOR, and com.mapd.parser.extension.ddl.SqlCreateRole.role.

49  {
50  super(OPERATOR, pos, false, false);
51  this.role = Objects.requireNonNull(role);
52  }

Member Function Documentation

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

Definition at line 54 of file SqlCreateRole.java.

References com.mapd.parser.extension.ddl.SqlCreateRole.role.

54  {
55  return ImmutableNullableList.of(role);
56  }
String com.mapd.parser.extension.ddl.SqlCreateRole.toString ( )
inline

Definition at line 66 of file SqlCreateRole.java.

66  {
67  EscapedStringJsonBuilder jsonBuilder = new EscapedStringJsonBuilder();
68  Map<String, Object> map = jsonBuilder.map();
69  jsonBuilder.put(map, "role", this.role.toString());
70  map.put("command", "CREATE_ROLE");
71  Map<String, Object> payload = jsonBuilder.map();
72  payload.put("payload", map);
73  return jsonBuilder.toJsonString(payload);
74  }
void com.mapd.parser.extension.ddl.SqlCreateRole.unparse ( SqlWriter  writer,
int  leftPrec,
int  rightPrec 
)
inline

Definition at line 59 of file SqlCreateRole.java.

59  {
60  writer.keyword("CREATE");
61  writer.keyword("ROLE");
62  role.unparse(writer, leftPrec, rightPrec);
63  }

Member Data Documentation

final SqlOperator com.mapd.parser.extension.ddl.SqlCreateRole.OPERATOR
staticprivate
Initial value:
=
new SqlSpecialOperator("CREATE_ROLE", SqlKind.OTHER_DDL)

Definition at line 45 of file SqlCreateRole.java.

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


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