DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Properties | Private Member Functions | Static Private Member Functions | List of all members
Deveel.Data.Sql.Parser.PrivilegeNode Class Reference
Inheritance diagram for Deveel.Data.Sql.Parser.PrivilegeNode:
Deveel.Data.Sql.Parser.SqlNode Deveel.Data.Sql.Parser.ISqlNode

Protected Member Functions

override ISqlNode OnChildNode (ISqlNode node)
 During the initialization of the node from the parser, this method is called for every child node added to ChildNodes More...
 
- Protected Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
virtual void OnNodeInit ()
 After the initialization of the node from the parser, this method is invoked to let the specific initialization to occur. More...
 

Properties

string Privilege [get, private set]
 
IEnumerable< string > Columns [get, private set]
 
static PrivilegeNode All [get, private set]
 
- Properties inherited from Deveel.Data.Sql.Parser.SqlNode
ISqlNode Parent [get, private set]
 Gets the parent of the current node. More...
 
string NodeName [get, private set]
 Gets the name of the node, as expressed in the SQL grammar. More...
 
IEnumerable< ISqlNodeChildNodes [get, private set]
 Gets an immutable list of nodes, children of the current node. More...
 
IEnumerable< TokenTokens [get, private set]
 Gets an immutable list of Token that represent the source of this node. More...
 
string ISqlNode. NodeName [get]
 
ISqlNode ISqlNode. Parent [get]
 
IEnumerable< ISqlNode > ISqlNode. ChildNodes [get]
 
IEnumerable< Token > ISqlNode. Tokens [get]
 
- Properties inherited from Deveel.Data.Sql.Parser.ISqlNode
string NodeName [get]
 Gets the name of the node analyzed from the parser. More...
 
ISqlNode Parent [get]
 Gets a reference to the parent ISqlNode, if any. More...
 
IEnumerable< ISqlNodeChildNodes [get]
 Gets a read-only enumeration of the children nodes, if any. More...
 
IEnumerable< TokenTokens [get]
 Gets an enumeration of the tokens composing the this node. More...
 

Private Member Functions

void GetPrivilegeWithColumns (ISqlNode node)
 
void GetColumns (ISqlNode node)
 

Static Private Member Functions

static PrivilegeNode ()
 

Additional Inherited Members

- Public Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
 SqlNode ()
 

Detailed Description

Definition at line 22 of file PrivilegeNode.cs.

Constructor & Destructor Documentation

static Deveel.Data.Sql.Parser.PrivilegeNode.PrivilegeNode ( )
inlinestaticprivate

Definition at line 23 of file PrivilegeNode.cs.

Member Function Documentation

void Deveel.Data.Sql.Parser.PrivilegeNode.GetColumns ( ISqlNode  node)
inlineprivate

Definition at line 57 of file PrivilegeNode.cs.

57  {
58  var childNode = node.ChildNodes.FirstOrDefault();
59  if (childNode == null)
60  return;
61 
62  var list = new List<string>();
63  foreach (var idNode in childNode.ChildNodes) {
64  if (idNode is IdentifierNode)
65  list.Add(((IdentifierNode)idNode).Text);
66  }
67 
68  Columns = list.AsEnumerable();
69  }
void Deveel.Data.Sql.Parser.PrivilegeNode.GetPrivilegeWithColumns ( ISqlNode  node)
inlineprivate

Definition at line 50 of file PrivilegeNode.cs.

50  {
51  foreach (var childNode in node.ChildNodes) {
52  if (childNode.NodeName.Equals("column_list_opt"))
53  GetColumns(childNode);
54  }
55  }
override ISqlNode Deveel.Data.Sql.Parser.PrivilegeNode.OnChildNode ( ISqlNode  node)
inlineprotectedvirtual

During the initialization of the node from the parser, this method is called for every child node added to ChildNodes

Parameters
nodeThe node being added to the list of children.
Returns
Returns a normalized version of the child node, or the node itself.

Reimplemented from Deveel.Data.Sql.Parser.SqlNode.

Definition at line 33 of file PrivilegeNode.cs.

33  {
34  if (node is SqlKeyNode) {
35  Privilege = ((SqlKeyNode) node).Text;
36  } else if (node.NodeName.Equals("update_priv")) {
37  Privilege = "UPDATE";
39  } else if (node.NodeName.Equals("select_priv")) {
40  Privilege = "SELECT";
42  } else if (node.NodeName.Equals("reference_priv")) {
43  Privilege = "REFERENCE";
45  }
46 
47  return base.OnChildNode(node);
48  }
void GetPrivilegeWithColumns(ISqlNode node)

Property Documentation

PrivilegeNode Deveel.Data.Sql.Parser.PrivilegeNode.All
staticgetprivate set

Definition at line 31 of file PrivilegeNode.cs.

IEnumerable<string> Deveel.Data.Sql.Parser.PrivilegeNode.Columns
getprivate set

Definition at line 29 of file PrivilegeNode.cs.

string Deveel.Data.Sql.Parser.PrivilegeNode.Privilege
getprivate set

Definition at line 27 of file PrivilegeNode.cs.


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