OmniSciDB  6686921089
 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

String command
 
SqlNodeList privileges
 
String type
 
String target
 
SqlNodeList grantees
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Definition at line 22 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 51 of file SqlGrantPrivilege.java.

51  {
52  return null;
53  }
String com.mapd.parser.extension.ddl.SqlGrantPrivilege.toString ( )
inline

Definition at line 56 of file SqlGrantPrivilege.java.

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

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

Member Data Documentation

String com.mapd.parser.extension.ddl.SqlGrantPrivilege.command
private

Definition at line 26 of file SqlGrantPrivilege.java.

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 23 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 30 of file SqlGrantPrivilege.java.

Referenced by generate_TableFunctionsFactory_init.Declaration.__getattr__(), generate_TableFunctionsFactory_init.ArgNode.__iter__(), generate_TableFunctionsFactory_init.Declaration.__repr__(), generate_TableFunctionsFactory_init.Declaration.__str__(), generate_TableFunctionsFactory_init.Token.__str__(), generate_TableFunctionsFactory_init.ArgNode.__str__(), generate_TableFunctionsFactory_init.ComposedNode.__str__(), generate_TableFunctionsFactory_init.TypeNode.is_column_list(), generate_TableFunctionsFactory_init.TypeNode.is_cursor(), generate_TableFunctionsFactory_init.TypeNode.is_output_buffer_sizer(), generate_TableFunctionsFactory_init.PrimitiveNode.is_text_encoding_dict(), omnisci.completion_hints.ttypes.TCompletionHint.read(), omnisci.common.ttypes.TTypeInfo.read(), omnisci.serialized_result_set.ttypes.TTargetInfo.read(), omnisci.serialized_result_set.ttypes.TCountDistinctSet.read(), omnisci.thrift.ttypes.TColumnRange.read(), omnisci.thrift.ttypes.TRenderDatum.read(), omnisci.thrift.OmniSci.get_db_object_privs_args.read(), com.mapd.parser.extension.ddl.SqlGrantPrivilege.SqlGrantPrivilege(), omnisci.completion_hints.ttypes.TCompletionHint.write(), omnisci.common.ttypes.TTypeInfo.write(), omnisci.serialized_result_set.ttypes.TTargetInfo.write(), omnisci.serialized_result_set.ttypes.TCountDistinctSet.write(), omnisci.thrift.ttypes.TColumnRange.write(), omnisci.thrift.ttypes.TRenderDatum.write(), and omnisci.thrift.OmniSci.get_db_object_privs_args.write().


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