@@ -68,26 +68,6 @@ public function setBaseExpression($baseExpression)
6868 $ this ->baseExpression = $ baseExpression ;
6969 }
7070
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-
9171 private $ brackets = false ;
9272
9373 /**
@@ -123,7 +103,6 @@ public function toInstanceDescriptor(MoufManager $moufManager)
123103 {
124104 $ instanceDescriptor = $ moufManager ->createInstance (get_called_class ());
125105 $ instanceDescriptor ->getProperty ('baseExpression ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->baseExpression , $ moufManager ));
126- $ instanceDescriptor ->getProperty ('subTree ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->subTree , $ moufManager ));
127106 $ instanceDescriptor ->getProperty ('brackets ' )->setValue (NodeFactory::nodeToInstanceDescriptor ($ this ->brackets , $ moufManager ));
128107
129108 return $ instanceDescriptor ;
@@ -132,16 +111,15 @@ public function toInstanceDescriptor(MoufManager $moufManager)
132111 /**
133112 * Renders the object as a SQL string.
134113 *
114+ * @param array $parameters
135115 * @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
140118 * @return string
141119 */
142120 public function toSql (array $ parameters = array (), Connection $ dbConnection = null , $ indent = 0 , $ conditionsMode = self ::CONDITION_APPLY )
143121 {
144- $ sql = NodeFactory:: toSql ( $ this -> subTree , $ dbConnection , $ parameters , ' ' , false , $ indent , $ conditionsMode ) ;
122+ $ sql = '' ;
145123
146124 if ($ this ->baseExpression ) {
147125 $ sql .= ' ' .$ this ->baseExpression .' ' ;
@@ -165,16 +143,6 @@ public function walk(VisitorInterface $visitor) {
165143 if ($ result instanceof NodeInterface) {
166144 $ node = $ result ;
167145 }
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- }
178146 return $ visitor ->leaveNode ($ node );
179147 }
180148}
0 commit comments