@@ -68,26 +68,6 @@ public function setBaseExpression($baseExpression)
68
68
$ this ->baseExpression = $ baseExpression ;
69
69
}
70
70
71
- private $ subTree ;
72
-
73
- public function getSubTree ()
74
- {
75
- return $ this ->subTree ;
76
- }
77
-
78
- /**
79
- * Sets the subtree.
80
- *
81
- * @Important
82
- *
83
- * @param array<NodeInterface>|NodeInterface $subTree
84
- */
85
- public function setSubTree ($ subTree )
86
- {
87
- $ this ->subTree = $ subTree ;
88
- $ this ->subTree = NodeFactory::simplify ($ this ->subTree );
89
- }
90
-
91
71
private $ brackets = false ;
92
72
93
73
/**
@@ -123,7 +103,6 @@ public function toInstanceDescriptor(MoufManager $moufManager)
123
103
{
124
104
$ instanceDescriptor = $ moufManager ->createInstance (get_called_class ());
125
105
$ instanceDescriptor ->getProperty ('baseExpression ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->baseExpression , $ moufManager ));
126
- $ instanceDescriptor ->getProperty ('subTree ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->subTree , $ moufManager ));
127
106
$ instanceDescriptor ->getProperty ('brackets ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->brackets , $ moufManager ));
128
107
129
108
return $ instanceDescriptor ;
@@ -132,16 +111,15 @@ public function toInstanceDescriptor(MoufManager $moufManager)
132
111
/**
133
112
* Renders the object as a SQL string.
134
113
*
114
+ * @param array $parameters
135
115
* @param Connection $dbConnection
136
- * @param array $parameters
137
- * @param number $indent
138
- * @param int $conditionsMode
139
- *
116
+ * @param int|number $indent
117
+ * @param int $conditionsMode
140
118
* @return string
141
119
*/
142
120
public function toSql (array $ parameters = array (), Connection $ dbConnection = null , $ indent = 0 , $ conditionsMode = self ::CONDITION_APPLY )
143
121
{
144
- $ sql = NodeFactory:: toSql ( $ this -> subTree , $ dbConnection , $ parameters , ' ' , false , $ indent , $ conditionsMode ) ;
122
+ $ sql = '' ;
145
123
146
124
if ($ this ->baseExpression ) {
147
125
$ sql .= ' ' .$ this ->baseExpression .' ' ;
@@ -165,16 +143,6 @@ public function walk(VisitorInterface $visitor) {
165
143
if ($ result instanceof NodeInterface) {
166
144
$ node = $ result ;
167
145
}
168
- if ($ result !== NodeTraverser::DONT_TRAVERSE_CHILDREN ) {
169
- foreach ($ this ->subTree as $ key => $ operand ) {
170
- $ result2 = $ operand ->walk ($ visitor );
171
- if ($ result2 === NodeTraverser::REMOVE_NODE ) {
172
- unset($ this ->subTree [$ key ]);
173
- } elseif ($ result2 instanceof NodeInterface) {
174
- $ this ->subTree [$ key ] = $ result2 ;
175
- }
176
- }
177
- }
178
146
return $ visitor ->leaveNode ($ node );
179
147
}
180
148
}
0 commit comments