3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\ORM\Query;
23 * An adapter implementation of the TreeWalker interface. The methods in this class
24 * are empty. This class exists as convenience for creating tree walkers.
26 * @author Roman Borschel <roman@code-factory.org>
29 abstract class TreeWalkerAdapter implements TreeWalker
32 private $_parserResult;
33 private $_queryComponents;
38 public function __construct($query, $parserResult, array $queryComponents)
40 $this->_query = $query;
41 $this->_parserResult = $parserResult;
42 $this->_queryComponents = $queryComponents;
48 protected function _getQueryComponents()
50 return $this->_queryComponents;
54 * Retrieve Query Instance reponsible for the current walkers execution.
56 * @return \Doctrine\ORM\Query
58 protected function _getQuery()
64 * Retrieve ParserResult
66 * @return \Doctrine\ORM\Query\ParserResult
68 protected function _getParserResult()
70 return $this->_parserResult;
74 * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
76 * @return string The SQL.
78 public function walkSelectStatement(AST\SelectStatement $AST) {}
81 * Walks down a SelectClause AST node, thereby generating the appropriate SQL.
83 * @return string The SQL.
85 public function walkSelectClause($selectClause) {}
88 * Walks down a FromClause AST node, thereby generating the appropriate SQL.
90 * @return string The SQL.
92 public function walkFromClause($fromClause) {}
95 * Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
97 * @return string The SQL.
99 public function walkFunction($function) {}
102 * Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
104 * @param OrderByClause
105 * @return string The SQL.
107 public function walkOrderByClause($orderByClause) {}
110 * Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
113 * @return string The SQL.
115 public function walkOrderByItem($orderByItem) {}
118 * Walks down a HavingClause AST node, thereby generating the appropriate SQL.
120 * @param HavingClause
121 * @return string The SQL.
123 public function walkHavingClause($havingClause) {}
126 * Walks down a Join AST node and creates the corresponding SQL.
129 * @return string The SQL.
131 public function walkJoin($join) {}
134 * Walks down a SelectExpression AST node and generates the corresponding SQL.
136 * @param SelectExpression $selectExpression
137 * @return string The SQL.
139 public function walkSelectExpression($selectExpression) {}
142 * Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
144 * @param QuantifiedExpression
145 * @return string The SQL.
147 public function walkQuantifiedExpression($qExpr) {}
150 * Walks down a Subselect AST node, thereby generating the appropriate SQL.
153 * @return string The SQL.
155 public function walkSubselect($subselect) {}
158 * Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
160 * @param SubselectFromClause
161 * @return string The SQL.
163 public function walkSubselectFromClause($subselectFromClause) {}
166 * Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
168 * @param SimpleSelectClause
169 * @return string The SQL.
171 public function walkSimpleSelectClause($simpleSelectClause) {}
174 * Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
176 * @param SimpleSelectExpression
177 * @return string The SQL.
179 public function walkSimpleSelectExpression($simpleSelectExpression) {}
182 * Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
184 * @param AggregateExpression
185 * @return string The SQL.
187 public function walkAggregateExpression($aggExpression) {}
190 * Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
192 * @param GroupByClause
193 * @return string The SQL.
195 public function walkGroupByClause($groupByClause) {}
198 * Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
201 * @return string The SQL.
203 public function walkGroupByItem($groupByItem) {}
206 * Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
208 * @param UpdateStatement
209 * @return string The SQL.
211 public function walkUpdateStatement(AST\UpdateStatement $AST) {}
214 * Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
216 * @param DeleteStatement
217 * @return string The SQL.
219 public function walkDeleteStatement(AST\DeleteStatement $AST) {}
222 * Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
224 * @param DeleteClause
225 * @return string The SQL.
227 public function walkDeleteClause(AST\DeleteClause $deleteClause) {}
230 * Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
232 * @param UpdateClause
233 * @return string The SQL.
235 public function walkUpdateClause($updateClause) {}
238 * Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
241 * @return string The SQL.
243 public function walkUpdateItem($updateItem) {}
246 * Walks down a WhereClause AST node, thereby generating the appropriate SQL.
249 * @return string The SQL.
251 public function walkWhereClause($whereClause) {}
254 * Walks down a ConditionalExpression AST node, thereby generating the appropriate SQL.
256 * @param ConditionalExpression
257 * @return string The SQL.
259 public function walkConditionalExpression($condExpr) {}
262 * Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
264 * @param ConditionalTerm
265 * @return string The SQL.
267 public function walkConditionalTerm($condTerm) {}
270 * Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
272 * @param ConditionalFactor
273 * @return string The SQL.
275 public function walkConditionalFactor($factor) {}
278 * Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
280 * @param ConditionalPrimary
281 * @return string The SQL.
283 public function walkConditionalPrimary($primary) {}
286 * Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
288 * @param ExistsExpression
289 * @return string The SQL.
291 public function walkExistsExpression($existsExpr) {}
294 * Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
296 * @param CollectionMemberExpression
297 * @return string The SQL.
299 public function walkCollectionMemberExpression($collMemberExpr) {}
302 * Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
304 * @param EmptyCollectionComparisonExpression
305 * @return string The SQL.
307 public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) {}
310 * Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
312 * @param NullComparisonExpression
313 * @return string The SQL.
315 public function walkNullComparisonExpression($nullCompExpr) {}
318 * Walks down an InExpression AST node, thereby generating the appropriate SQL.
320 * @param InExpression
321 * @return string The SQL.
323 public function walkInExpression($inExpr) {}
326 * Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
328 * @param InstanceOfExpression
329 * @return string The SQL.
331 function walkInstanceOfExpression($instanceOfExpr) {}
334 * Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
337 * @return string The SQL.
339 public function walkLiteral($literal) {}
342 * Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
344 * @param BetweenExpression
345 * @return string The SQL.
347 public function walkBetweenExpression($betweenExpr) {}
350 * Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
352 * @param LikeExpression
353 * @return string The SQL.
355 public function walkLikeExpression($likeExpr) {}
358 * Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
360 * @param StateFieldPathExpression
361 * @return string The SQL.
363 public function walkStateFieldPathExpression($stateFieldPathExpression) {}
366 * Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
368 * @param ComparisonExpression
369 * @return string The SQL.
371 public function walkComparisonExpression($compExpr) {}
374 * Walks down an InputParameter AST node, thereby generating the appropriate SQL.
376 * @param InputParameter
377 * @return string The SQL.
379 public function walkInputParameter($inputParam) {}
382 * Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
384 * @param ArithmeticExpression
385 * @return string The SQL.
387 public function walkArithmeticExpression($arithmeticExpr) {}
390 * Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
393 * @return string The SQL.
395 public function walkArithmeticTerm($term) {}
398 * Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
401 * @return string The SQL.
403 public function walkStringPrimary($stringPrimary) {}
406 * Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
409 * @return string The SQL.
411 public function walkArithmeticFactor($factor) {}
414 * Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
416 * @param SimpleArithmeticExpression
417 * @return string The SQL.
419 public function walkSimpleArithmeticExpression($simpleArithmeticExpr) {}
422 * Walks down an PathExpression AST node, thereby generating the appropriate SQL.
425 * @return string The SQL.
427 public function walkPathExpression($pathExpr) {}
430 * Walks down an ResultVariable AST node, thereby generating the appropriate SQL.
432 * @param string $resultVariable
433 * @return string The SQL.
435 public function walkResultVariable($resultVariable) {}
438 * Gets an executor that can be used to execute the result of this walker.
440 * @return AbstractExecutor
442 public function getExecutor($AST) {}