1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
|
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Query;
use Doctrine\ORM\AbstractQuery;
/**
* Interface for walkers of DQL ASTs (abstract syntax trees).
*
* @psalm-import-type QueryComponent from Parser
*/
interface TreeWalker
{
/**
* Initializes TreeWalker with important information about the ASTs to be walked.
*
* @param AbstractQuery $query The parsed Query.
* @param ParserResult $parserResult The result of the parsing process.
* @param mixed[] $queryComponents The query components (symbol table).
* @psalm-param array<string, QueryComponent> $queryComponents The query components (symbol table).
*/
public function __construct($query, $parserResult, array $queryComponents);
/**
* Returns internal queryComponents array.
*
* @return array<string, array<string, mixed>>
* @psalm-return array<string, QueryComponent>
*/
public function getQueryComponents();
/**
* Sets or overrides a query component for a given dql alias.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param string $dqlAlias The DQL alias.
* @param array<string, mixed> $queryComponent
* @psalm-param QueryComponent $queryComponent
*
* @return void
*/
public function setQueryComponent($dqlAlias, array $queryComponent);
/**
* Walks down a SelectStatement AST node.
*
* @return void
*/
public function walkSelectStatement(AST\SelectStatement $AST);
/**
* Walks down a SelectClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SelectClause $selectClause
*
* @return void
*/
public function walkSelectClause($selectClause);
/**
* Walks down a FromClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\FromClause $fromClause
*
* @return void
*/
public function walkFromClause($fromClause);
/**
* Walks down a FunctionNode AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\Functions\FunctionNode $function
*
* @return void
*/
public function walkFunction($function);
/**
* Walks down an OrderByClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\OrderByClause $orderByClause
*
* @return void
*/
public function walkOrderByClause($orderByClause);
/**
* Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\OrderByItem $orderByItem
*
* @return void
*/
public function walkOrderByItem($orderByItem);
/**
* Walks down a HavingClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\HavingClause $havingClause
*
* @return void
*/
public function walkHavingClause($havingClause);
/**
* Walks down a Join AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\Join $join
*
* @return void
*/
public function walkJoin($join);
/**
* Walks down a SelectExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SelectExpression $selectExpression
*
* @return void
*/
public function walkSelectExpression($selectExpression);
/**
* Walks down a QuantifiedExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\QuantifiedExpression $qExpr
*
* @return void
*/
public function walkQuantifiedExpression($qExpr);
/**
* Walks down a Subselect AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\Subselect $subselect
*
* @return void
*/
public function walkSubselect($subselect);
/**
* Walks down a SubselectFromClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SubselectFromClause $subselectFromClause
*
* @return void
*/
public function walkSubselectFromClause($subselectFromClause);
/**
* Walks down a SimpleSelectClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SimpleSelectClause $simpleSelectClause
*
* @return void
*/
public function walkSimpleSelectClause($simpleSelectClause);
/**
* Walks down a SimpleSelectExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SimpleSelectExpression $simpleSelectExpression
*
* @return void
*/
public function walkSimpleSelectExpression($simpleSelectExpression);
/**
* Walks down an AggregateExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\AggregateExpression $aggExpression
*
* @return void
*/
public function walkAggregateExpression($aggExpression);
/**
* Walks down a GroupByClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\GroupByClause $groupByClause
*
* @return void
*/
public function walkGroupByClause($groupByClause);
/**
* Walks down a GroupByItem AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\PathExpression|string $groupByItem
*
* @return void
*/
public function walkGroupByItem($groupByItem);
/**
* Walks down an UpdateStatement AST node.
*
* @return void
*/
public function walkUpdateStatement(AST\UpdateStatement $AST);
/**
* Walks down a DeleteStatement AST node.
*
* @return void
*/
public function walkDeleteStatement(AST\DeleteStatement $AST);
/**
* Walks down a DeleteClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @return void
*/
public function walkDeleteClause(AST\DeleteClause $deleteClause);
/**
* Walks down an UpdateClause AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\UpdateClause $updateClause
*
* @return void
*/
public function walkUpdateClause($updateClause);
/**
* Walks down an UpdateItem AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\UpdateItem $updateItem
*
* @return void
*/
public function walkUpdateItem($updateItem);
/**
* Walks down a WhereClause AST node.
*
* WhereClause or not, the appropriate discriminator sql is added.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\WhereClause $whereClause
*
* @return void
*/
public function walkWhereClause($whereClause);
/**
* Walk down a ConditionalExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ConditionalExpression $condExpr
*
* @return void
*/
public function walkConditionalExpression($condExpr);
/**
* Walks down a ConditionalTerm AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ConditionalTerm $condTerm
*
* @return void
*/
public function walkConditionalTerm($condTerm);
/**
* Walks down a ConditionalFactor AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ConditionalFactor $factor
*
* @return void
*/
public function walkConditionalFactor($factor);
/**
* Walks down a ConditionalPrimary AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ConditionalPrimary $primary
*
* @return void
*/
public function walkConditionalPrimary($primary);
/**
* Walks down an ExistsExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ExistsExpression $existsExpr
*
* @return void
*/
public function walkExistsExpression($existsExpr);
/**
* Walks down a CollectionMemberExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\CollectionMemberExpression $collMemberExpr
*
* @return void
*/
public function walkCollectionMemberExpression($collMemberExpr);
/**
* Walks down an EmptyCollectionComparisonExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\EmptyCollectionComparisonExpression $emptyCollCompExpr
*
* @return void
*/
public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr);
/**
* Walks down a NullComparisonExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\NullComparisonExpression $nullCompExpr
*
* @return void
*/
public function walkNullComparisonExpression($nullCompExpr);
/**
* Walks down an InExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\InExpression $inExpr
*
* @return void
*/
public function walkInExpression($inExpr);
/**
* Walks down an InstanceOfExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\InstanceOfExpression $instanceOfExpr
*
* @return void
*/
public function walkInstanceOfExpression($instanceOfExpr);
/**
* Walks down a literal that represents an AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\Literal $literal
*
* @return void
*/
public function walkLiteral($literal);
/**
* Walks down a BetweenExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\BetweenExpression $betweenExpr
*
* @return void
*/
public function walkBetweenExpression($betweenExpr);
/**
* Walks down a LikeExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\LikeExpression $likeExpr
*
* @return void
*/
public function walkLikeExpression($likeExpr);
/**
* Walks down a StateFieldPathExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\PathExpression $stateFieldPathExpression
*
* @return void
*/
public function walkStateFieldPathExpression($stateFieldPathExpression);
/**
* Walks down a ComparisonExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ComparisonExpression $compExpr
*
* @return void
*/
public function walkComparisonExpression($compExpr);
/**
* Walks down an InputParameter AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\InputParameter $inputParam
*
* @return void
*/
public function walkInputParameter($inputParam);
/**
* Walks down an ArithmeticExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\ArithmeticExpression $arithmeticExpr
*
* @return void
*/
public function walkArithmeticExpression($arithmeticExpr);
/**
* Walks down an ArithmeticTerm AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param mixed $term
*
* @return void
*/
public function walkArithmeticTerm($term);
/**
* Walks down a StringPrimary that represents an AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param mixed $stringPrimary
*
* @return void
*/
public function walkStringPrimary($stringPrimary);
/**
* Walks down an ArithmeticFactor that represents an AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param mixed $factor
*
* @return void
*/
public function walkArithmeticFactor($factor);
/**
* Walks down an SimpleArithmeticExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\SimpleArithmeticExpression $simpleArithmeticExpr
*
* @return void
*/
public function walkSimpleArithmeticExpression($simpleArithmeticExpr);
/**
* Walks down a PathExpression AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\PathExpression $pathExpr
*
* @return void
*/
public function walkPathExpression($pathExpr);
/**
* Walks down a ResultVariable that represents an AST node.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param string $resultVariable
*
* @return void
*/
public function walkResultVariable($resultVariable);
/**
* Gets an executor that can be used to execute the result of this walker.
*
* @deprecated This method will be removed from the interface in 3.0.
*
* @param AST\DeleteStatement|AST\UpdateStatement|AST\SelectStatement $AST
*
* @return Exec\AbstractSqlExecutor
*/
public function getExecutor($AST);
}
|