DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | List of all members
Deveel.Data.Sql.Parser.SqlNodeVisitor Class Reference

The default implementation of a ISqlNodeVisitor that implements the visitor as a protected accessor. More...

Inheritance diagram for Deveel.Data.Sql.Parser.SqlNodeVisitor:
Deveel.Data.Sql.Parser.ISqlNodeVisitor

Public Member Functions

virtual void Visit (ISqlNode node)
 Visits the given SQL node. More...
 
virtual void VisitStringLiteral (StringLiteralNode node)
 
virtual void VisitNumberLiteral (NumberLiteralNode node)
 
virtual void VisitIntegerLiteral (IntegerLiteralNode node)
 
virtual void VisitDataType (DataTypeNode node)
 
virtual void VisitExpression (IExpressionNode node)
 
virtual void VisitNodeList (IEnumerable< ISqlNode > nodes)
 
virtual void VisitQueryExpression (SqlQueryExpressionNode node)
 
virtual void VisitTupleExpression (SqlExpressionTupleNode node)
 
virtual void VisitUnaryExpression (SqlUnaryExpressionNode node)
 
virtual void VisitBinaryExpression (SqlBinaryExpressionNode node)
 
virtual void VisitFunctionCall (SqlFunctionCallExpressionNode node)
 
virtual void VisitCaseExpression (SqlCaseExpressionNode node)
 
virtual void VisitBetweenExpression (SqlBetweenExpressionNode node)
 
virtual void VisitVariableRefExpression (SqlVariableRefExpressionNode node)
 
virtual void VisitConstantExpression (SqlConstantExpressionNode node)
 
virtual void VisitReferenceExpression (SqlReferenceExpressionNode node)
 
virtual void VisitStatement (IStatementNode node)
 
virtual void VisitSelect (SelectStatementNode node)
 
virtual void VisitCreateTrigger (CreateTriggerNode node)
 
virtual void VisitCreateView (CreateViewNode node)
 
virtual void VisitCreateTable (CreateTableNode node)
 
virtual void VisitAlterTable (AlterTableNode node)
 
virtual void VisitAlterTableAction (IAlterActionNode action)
 
virtual void VisitTableConstraints (IEnumerable< TableConstraintNode > constraints)
 
virtual void VisitTableConstraint (TableConstraintNode arg)
 
virtual void VisitTableColumns (IEnumerable< TableColumnNode > columnNodes)
 
virtual void VisitUpdate (UpdateStatementNode node)
 
virtual void VisitSimpleUpdate (SimpleUpdateNode node)
 
virtual void VisitQueryUpdate (QueryUpdateNode node)
 
virtual void VisitInsert (InsertStatementNode node)
 

Detailed Description

The default implementation of a ISqlNodeVisitor that implements the visitor as a protected accessor.

Definition at line 26 of file SqlNodeVisitor.cs.

Member Function Documentation

virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.Visit ( ISqlNode  node)
inlinevirtual

Visits the given SQL node.

Parameters
nodeThe ISqlNode to visit.
See also
ISqlNodeVisitor.Visit

Implements Deveel.Data.Sql.Parser.ISqlNodeVisitor.

Definition at line 32 of file SqlNodeVisitor.cs.

32  {
33  if (node is IntegerLiteralNode) {
34  VisitIntegerLiteral((IntegerLiteralNode) node);
35  } else if (node is NumberLiteralNode) {
36  VisitNumberLiteral((NumberLiteralNode) node);
37  } else if (node is StringLiteralNode) {
38  VisitStringLiteral((StringLiteralNode) node);
39  } else if (node is DataTypeNode) {
40  VisitDataType((DataTypeNode) node);
41  } else if (node is IExpressionNode) {
42  VisitExpression((IExpressionNode) node);
43  } else if (node is IStatementNode) {
44  VisitStatement((IStatementNode) node);
45  } else if (node is ISqlVisitableNode) {
46  ((ISqlVisitableNode) node).Accept(this);
47  }
48  }
virtual void VisitNumberLiteral(NumberLiteralNode node)
virtual void VisitIntegerLiteral(IntegerLiteralNode node)
virtual void VisitExpression(IExpressionNode node)
virtual void VisitStringLiteral(StringLiteralNode node)
virtual void VisitDataType(DataTypeNode node)
virtual void VisitStatement(IStatementNode node)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitAlterTable ( AlterTableNode  node)
inlinevirtual

Definition at line 175 of file SqlNodeVisitor.cs.

175  {
176  if (node.CreateTable != null)
177  VisitCreateTable(node.CreateTable);
178 
179  if (node.Actions != null) {
180  foreach (var action in node.Actions) {
181  VisitAlterTableAction(action);
182  }
183  }
184  }
virtual void VisitCreateTable(CreateTableNode node)
virtual void VisitAlterTableAction(IAlterActionNode action)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitAlterTableAction ( IAlterActionNode  action)
inlinevirtual

Definition at line 186 of file SqlNodeVisitor.cs.

186  {
187  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitBetweenExpression ( SqlBetweenExpressionNode  node)
inlinevirtual

Definition at line 120 of file SqlNodeVisitor.cs.

120  {
121  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitBinaryExpression ( SqlBinaryExpressionNode  node)
inlinevirtual

Definition at line 111 of file SqlNodeVisitor.cs.

111  {
112  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitCaseExpression ( SqlCaseExpressionNode  node)
inlinevirtual

Definition at line 117 of file SqlNodeVisitor.cs.

117  {
118  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitConstantExpression ( SqlConstantExpressionNode  node)
inlinevirtual

Definition at line 126 of file SqlNodeVisitor.cs.

126  {
127  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitCreateTable ( CreateTableNode  node)
inlinevirtual

Definition at line 168 of file SqlNodeVisitor.cs.

168  {
169  if (node.Columns != null)
170  VisitTableColumns(node.Columns);
171  if (node.Constraints != null)
172  VisitTableConstraints(node.Constraints);
173  }
virtual void VisitTableConstraints(IEnumerable< TableConstraintNode > constraints)
virtual void VisitTableColumns(IEnumerable< TableColumnNode > columnNodes)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitCreateTrigger ( CreateTriggerNode  node)
inlinevirtual

Definition at line 158 of file SqlNodeVisitor.cs.

158  {
159  if (node.ProcedureArguments != null)
160  VisitNodeList(node.ProcedureArguments);
161 
162  // TODO: handle the body
163  }
virtual void VisitNodeList(IEnumerable< ISqlNode > nodes)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitCreateView ( CreateViewNode  node)
inlinevirtual

Definition at line 165 of file SqlNodeVisitor.cs.

165  {
166  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitDataType ( DataTypeNode  node)
inlinevirtual

Definition at line 59 of file SqlNodeVisitor.cs.

59  {
60  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitExpression ( IExpressionNode  node)
inlinevirtual

Definition at line 62 of file SqlNodeVisitor.cs.

62  {
63  if (node == null)
64  return;
65 
66  if (node is SqlConstantExpressionNode) {
67  VisitConstantExpression((SqlConstantExpressionNode) node);
68  } else if (node is SqlReferenceExpressionNode) {
69  VisitReferenceExpression((SqlReferenceExpressionNode) node);
70  } else if (node is SqlVariableRefExpressionNode) {
71  VisitVariableRefExpression((SqlVariableRefExpressionNode) node);
72  } else if (node is SqlBetweenExpressionNode) {
73  VisitBetweenExpression((SqlBetweenExpressionNode) node);
74  } else if (node is SqlCaseExpressionNode) {
75  VisitCaseExpression((SqlCaseExpressionNode) node);
76  } else if (node is SqlFunctionCallExpressionNode) {
77  VisitFunctionCall((SqlFunctionCallExpressionNode) node);
78  } else if (node is SqlExpressionTupleNode) {
79  VisitTupleExpression((SqlExpressionTupleNode) node);
80  } else if (node is SqlBinaryExpressionNode) {
81  VisitBinaryExpression((SqlBinaryExpressionNode) node);
82  } else if (node is SqlUnaryExpressionNode) {
83  VisitUnaryExpression((SqlUnaryExpressionNode) node);
84  } else if (node is SqlQueryExpressionNode) {
85  VisitQueryExpression((SqlQueryExpressionNode) node);
86  } else {
87  throw new InvalidOperationException(String.Format("The expression node of type '{0}' is invalid.", node.GetType()));
88  }
89  }
virtual void VisitBetweenExpression(SqlBetweenExpressionNode node)
A long string in the system.
virtual void VisitReferenceExpression(SqlReferenceExpressionNode node)
virtual void VisitFunctionCall(SqlFunctionCallExpressionNode node)
virtual void VisitConstantExpression(SqlConstantExpressionNode node)
virtual void VisitUnaryExpression(SqlUnaryExpressionNode node)
virtual void VisitCaseExpression(SqlCaseExpressionNode node)
virtual void VisitBinaryExpression(SqlBinaryExpressionNode node)
virtual void VisitTupleExpression(SqlExpressionTupleNode node)
virtual void VisitVariableRefExpression(SqlVariableRefExpressionNode node)
virtual void VisitQueryExpression(SqlQueryExpressionNode node)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitFunctionCall ( SqlFunctionCallExpressionNode  node)
inlinevirtual

Definition at line 114 of file SqlNodeVisitor.cs.

114  {
115  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitInsert ( InsertStatementNode  node)
inlinevirtual

Definition at line 218 of file SqlNodeVisitor.cs.

218  {
219  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitIntegerLiteral ( IntegerLiteralNode  node)
inlinevirtual

Definition at line 56 of file SqlNodeVisitor.cs.

56  {
57  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitNodeList ( IEnumerable< ISqlNode nodes)
inlinevirtual

Definition at line 91 of file SqlNodeVisitor.cs.

91  {
92  foreach (var node in nodes) {
93  Visit(node);
94  }
95  }
virtual void Visit(ISqlNode node)
Visits the given SQL node.
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitNumberLiteral ( NumberLiteralNode  node)
inlinevirtual

Definition at line 53 of file SqlNodeVisitor.cs.

53  {
54  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitQueryExpression ( SqlQueryExpressionNode  node)
inlinevirtual

Definition at line 99 of file SqlNodeVisitor.cs.

99  {
100  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitQueryUpdate ( QueryUpdateNode  node)
inlinevirtual

Definition at line 213 of file SqlNodeVisitor.cs.

213  {
214 
215  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitReferenceExpression ( SqlReferenceExpressionNode  node)
inlinevirtual

Definition at line 129 of file SqlNodeVisitor.cs.

129  {
130  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitSelect ( SelectStatementNode  node)
inlinevirtual

Definition at line 152 of file SqlNodeVisitor.cs.

152  {
153  var exp = node.QueryExpression;
154  if (exp != null)
155  VisitExpression(exp);
156  }
virtual void VisitExpression(IExpressionNode node)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitSimpleUpdate ( SimpleUpdateNode  node)
inlinevirtual

Definition at line 209 of file SqlNodeVisitor.cs.

209  {
210 
211  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitStatement ( IStatementNode  node)
inlinevirtual

Definition at line 136 of file SqlNodeVisitor.cs.

136  {
137  if (node is CreateTableNode)
138  VisitCreateTable((CreateTableNode) node);
139  if (node is CreateViewNode)
140  VisitCreateView((CreateViewNode) node);
141  if (node is CreateTriggerNode) {
142  VisitCreateTrigger((CreateTriggerNode) node);
143  } else if (node is SelectStatementNode) {
144  VisitSelect((SelectStatementNode) node);
145  } else if (node is UpdateStatementNode) {
146  VisitUpdate((UpdateStatementNode) node);
147  } else if (node is InsertStatementNode) {
148  VisitInsert((InsertStatementNode) node);
149  }
150  }
virtual void VisitCreateTable(CreateTableNode node)
virtual void VisitSelect(SelectStatementNode node)
virtual void VisitUpdate(UpdateStatementNode node)
virtual void VisitCreateTrigger(CreateTriggerNode node)
virtual void VisitCreateView(CreateViewNode node)
virtual void VisitInsert(InsertStatementNode node)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitStringLiteral ( StringLiteralNode  node)
inlinevirtual

Definition at line 50 of file SqlNodeVisitor.cs.

50  {
51  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitTableColumns ( IEnumerable< TableColumnNode columnNodes)
inlinevirtual

Definition at line 199 of file SqlNodeVisitor.cs.

199  {
200  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitTableConstraint ( TableConstraintNode  arg)
inlinevirtual

Definition at line 195 of file SqlNodeVisitor.cs.

195  {
196 
197  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitTableConstraints ( IEnumerable< TableConstraintNode constraints)
inlinevirtual

Definition at line 189 of file SqlNodeVisitor.cs.

189  {
190  foreach (var constraint in constraints) {
191  VisitTableConstraint(constraint);
192  }
193  }
virtual void VisitTableConstraint(TableConstraintNode arg)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitTupleExpression ( SqlExpressionTupleNode  node)
inlinevirtual

Definition at line 102 of file SqlNodeVisitor.cs.

102  {
103  var exps = node.Expressions;
104  if (exps != null)
105  VisitNodeList(exps.Cast<ISqlNode>());
106  }
virtual void VisitNodeList(IEnumerable< ISqlNode > nodes)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitUnaryExpression ( SqlUnaryExpressionNode  node)
inlinevirtual

Definition at line 108 of file SqlNodeVisitor.cs.

108  {
109  }
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitUpdate ( UpdateStatementNode  node)
inlinevirtual

Definition at line 202 of file SqlNodeVisitor.cs.

202  {
203  if (node.SimpleUpdate != null)
204  VisitSimpleUpdate(node.SimpleUpdate);
205  if (node.QueryUpdate != null)
206  VisitQueryUpdate(node.QueryUpdate);
207  }
virtual void VisitSimpleUpdate(SimpleUpdateNode node)
virtual void VisitQueryUpdate(QueryUpdateNode node)
virtual void Deveel.Data.Sql.Parser.SqlNodeVisitor.VisitVariableRefExpression ( SqlVariableRefExpressionNode  node)
inlinevirtual

Definition at line 123 of file SqlNodeVisitor.cs.

123  {
124  }

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