DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Parser.UpdateStatementNode Class Reference
Inheritance diagram for Deveel.Data.Sql.Parser.UpdateStatementNode:
Deveel.Data.Sql.Parser.SqlStatementNode Deveel.Data.Sql.Parser.SqlNode Deveel.Data.Sql.Parser.ISqlVisitableNode Deveel.Data.Sql.Parser.IStatementNode Deveel.Data.Sql.Parser.ISqlNode Deveel.Data.Sql.Parser.ISqlNode 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...
 
override void BuildStatement (StatementBuilder builder)
 
- 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

SimpleUpdateNode SimpleUpdate [get, private set]
 
QueryUpdateNode QueryUpdate [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 BuildSimpleUpdate (StatementBuilder builder, SimpleUpdateNode node)
 
IEnumerable< SqlColumnAssignmentUpdateAssignments (IEnumerable< UpdateColumnNode > columns)
 
void BuildQueryUpdate (StatementBuilder builder, QueryUpdateNode node)
 

Additional Inherited Members

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

Detailed Description

Definition at line 25 of file UpdateStatementNode.cs.

Member Function Documentation

void Deveel.Data.Sql.Parser.UpdateStatementNode.BuildQueryUpdate ( StatementBuilder  builder,
QueryUpdateNode  node 
)
inlineprivate

Definition at line 61 of file UpdateStatementNode.cs.

61  {
62  throw new NotImplementedException();
63  }
void Deveel.Data.Sql.Parser.UpdateStatementNode.BuildSimpleUpdate ( StatementBuilder  builder,
SimpleUpdateNode  node 
)
inlineprivate

Definition at line 48 of file UpdateStatementNode.cs.

48  {
49  var whereExpression = ExpressionBuilder.Build(node.WhereExpression);
50  var assignments = UpdateAssignments(node.Columns);
51  builder.Statements.Add(new UpdateStatement(node.TableName, whereExpression, assignments));
52  }
IEnumerable< SqlColumnAssignment > UpdateAssignments(IEnumerable< UpdateColumnNode > columns)
override void Deveel.Data.Sql.Parser.UpdateStatementNode.BuildStatement ( StatementBuilder  builder)
inlineprotectedvirtual

Implements Deveel.Data.Sql.Parser.SqlStatementNode.

Definition at line 40 of file UpdateStatementNode.cs.

40  {
41  if (SimpleUpdate != null) {
43  } else if (QueryUpdate != null) {
44  BuildQueryUpdate(builder, QueryUpdate);
45  }
46  }
void BuildQueryUpdate(StatementBuilder builder, QueryUpdateNode node)
void BuildSimpleUpdate(StatementBuilder builder, SimpleUpdateNode node)
override ISqlNode Deveel.Data.Sql.Parser.UpdateStatementNode.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 30 of file UpdateStatementNode.cs.

30  {
31  if (node is SimpleUpdateNode) {
32  SimpleUpdate = (SimpleUpdateNode) node;
33  } else if (node is QueryUpdateNode) {
34  QueryUpdate = (QueryUpdateNode) node;
35  }
36 
37  return base.OnChildNode(node);
38  }
override ISqlNode OnChildNode(ISqlNode node)
During the initialization of the node from the parser, this method is called for every child node add...
IEnumerable<SqlColumnAssignment> Deveel.Data.Sql.Parser.UpdateStatementNode.UpdateAssignments ( IEnumerable< UpdateColumnNode columns)
inlineprivate

Definition at line 54 of file UpdateStatementNode.cs.

54  {
55  if (columns == null)
56  return null;
57 
58  return columns.Select(column => new SqlColumnAssignment(column.ColumnName, ExpressionBuilder.Build(column.Expression)));
59  }

Property Documentation

QueryUpdateNode Deveel.Data.Sql.Parser.UpdateStatementNode.QueryUpdate
getprivate set

Definition at line 28 of file UpdateStatementNode.cs.

SimpleUpdateNode Deveel.Data.Sql.Parser.UpdateStatementNode.SimpleUpdate
getprivate set

Definition at line 26 of file UpdateStatementNode.cs.


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