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

Public Member Functions

 SqlGrantPrivilege (SqlParserPos pos, SqlNodeList privileges, String type, String target, SqlNodeList grantees)
 
List< SqlNode > getOperandList ()
 
String toString ()
 

Private Attributes

SqlNodeList privileges
 
String type
 
String target
 
SqlNodeList grantees
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Definition at line 19 of file SqlGrantPrivilege.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlGrantPrivilege.SqlGrantPrivilege ( SqlParserPos  pos,
SqlNodeList  privileges,
String  type,
String  target,
SqlNodeList  grantees 
)
inline

Member Function Documentation

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

Definition at line 45 of file SqlGrantPrivilege.java.

45  {
46  return null;
47  }
String com.mapd.parser.extension.ddl.SqlGrantPrivilege.toString ( )
inline

Definition at line 50 of file SqlGrantPrivilege.java.

References com.mapd.parser.extension.ddl.SqlGrantPrivilege.grantees, com.mapd.parser.extension.ddl.SqlGrantPrivilege.privileges, and run_benchmark_import.type.

50  {
51  EscapedStringJsonBuilder jsonBuilder = new EscapedStringJsonBuilder();
52  Map<String, Object> map = jsonBuilder.map();
53 
54  if (this.privileges != null) {
55  List<Object> privilege_list = jsonBuilder.list();
56  for (SqlNode privilege : this.privileges) {
57  // privilege are string literals,
58  // so may need to be later striped of the quotes that get added
59  privilege_list.add(privilege.toString());
60  }
61  map.put("privileges", privilege_list);
62  }
63 
64  map.put("type", this.type);
65  map.put("target", this.target);
66 
67  if (this.grantees != null) {
68  List<Object> grantee_list = jsonBuilder.list();
69  for (SqlNode grantee : this.grantees) {
70  grantee_list.add(grantee.toString());
71  }
72  map.put("grantees", grantee_list);
73  }
74 
75  map.put("command", "GRANT_PRIVILEGE");
76  Map<String, Object> payload = jsonBuilder.map();
77  payload.put("payload", map);
78  return jsonBuilder.toJsonString(payload);
79  }

Member Data Documentation

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

Definition at line 20 of file SqlGrantPrivilege.java.

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

SqlNodeList com.mapd.parser.extension.ddl.SqlGrantPrivilege.privileges
private
String com.mapd.parser.extension.ddl.SqlGrantPrivilege.target
private
String com.mapd.parser.extension.ddl.SqlGrantPrivilege.type
private

Definition at line 25 of file SqlGrantPrivilege.java.

Referenced by TableFunctionsFactory_node.PrimitiveNode.__eq__(), TableFunctionsFactory_declbracket.Declaration.__getattr__(), TableFunctionsFactory_node.ArgNode.__iter__(), TableFunctionsFactory_declbracket.Declaration.__repr__(), TableFunctionsFactory_declbracket.Declaration.__str__(), TableFunctionsFactory_parser.Token.__str__(), TableFunctionsFactory_node.TypeNode.is_array_text_encoding_dict(), TableFunctionsFactory_node.TypeNode.is_column(), TableFunctionsFactory_node.TypeNode.is_column_list(), TableFunctionsFactory_node.TypeNode.is_cursor(), TableFunctionsFactory_node.TypeNode.is_output_buffer_sizer(), TableFunctionsFactory_node.TypeNode.is_string_scalar(), TableFunctionsFactory_node.TypeNode.is_text_encoding_dict(), heavydb.completion_hints.ttypes.TCompletionHint.read(), heavydb.common.ttypes.TTypeInfo.read(), heavydb.serialized_result_set.ttypes.TTargetInfo.read(), heavydb.serialized_result_set.ttypes.TCountDistinctSet.read(), heavydb.thrift.ttypes.TColumnRange.read(), heavydb.thrift.ttypes.TRenderDatum.read(), heavydb.thrift.Heavy.get_db_object_privs_args.read(), com.mapd.parser.extension.ddl.SqlGrantPrivilege.SqlGrantPrivilege(), heavydb.completion_hints.ttypes.TCompletionHint.write(), heavydb.common.ttypes.TTypeInfo.write(), heavydb.serialized_result_set.ttypes.TTargetInfo.write(), heavydb.serialized_result_set.ttypes.TCountDistinctSet.write(), heavydb.thrift.ttypes.TColumnRange.write(), heavydb.thrift.ttypes.TRenderDatum.write(), and heavydb.thrift.Heavy.get_db_object_privs_args.write().


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