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

Public Member Functions

 SqlCreatePolicy (final SqlParserPos pos, final List< String > columnName, final SqlNodeList valuesList, final SqlIdentifier granteeName)
 
List< SqlNode > getOperandList ()
 
String toString ()
 

Private Attributes

String command
 
List< String > columnName
 
SqlNodeList valuesList
 
SqlIdentifier granteeName
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Class that encapsulates all information associated with a CREATE POLICY DDL command.

Definition at line 22 of file SqlCreatePolicy.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlCreatePolicy.SqlCreatePolicy ( final SqlParserPos  pos,
final List< String >  columnName,
final SqlNodeList  valuesList,
final SqlIdentifier  granteeName 
)
inline

Member Function Documentation

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

Definition at line 47 of file SqlCreatePolicy.java.

47  {
48  return null;
49  }
String com.mapd.parser.extension.ddl.SqlCreatePolicy.toString ( )
inline

Definition at line 52 of file SqlCreatePolicy.java.

References anonymous_namespace{Utm.h}.n, and com.mapd.parser.extension.ddl.SqlCreatePolicy.valuesList.

52  {
53  JsonBuilder jsonBuilder = new EscapedStringJsonBuilder();
54  Map<String, Object> map = jsonBuilder.map();
55 
56  map.put("command", this.command);
57  map.put("columnName", this.columnName);
58 
59  List<Object> v = jsonBuilder.list();
60  if (this.valuesList != null) {
61  for (SqlNode n : this.valuesList) {
62  v.add(n.toString());
63  }
64  }
65  jsonBuilder.put(map, "valuesList", v);
66 
67  map.put("granteeName", this.granteeName.toString());
68 
69  Map<String, Object> payload = jsonBuilder.map();
70  payload.put("payload", map);
71 
72  // To Debug:
73  // System.out.println(jsonBuilder.toJsonString(payload))
74 
75  return jsonBuilder.toJsonString(payload);
76  }
constexpr double n
Definition: Utm.h:38

Member Data Documentation

List<String> com.mapd.parser.extension.ddl.SqlCreatePolicy.columnName
private
String com.mapd.parser.extension.ddl.SqlCreatePolicy.command
private

Definition at line 27 of file SqlCreatePolicy.java.

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

Definition at line 23 of file SqlCreatePolicy.java.

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

SqlNodeList com.mapd.parser.extension.ddl.SqlCreatePolicy.valuesList
private

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