@@ 2406-2421 (lines=16) @@ | ||
2403 | * @param string $alias |
|
2404 | * @return mixed |
|
2405 | */ |
|
2406 | private function subqueryGtExpression($query, $subquery, $params, $alias) |
|
2407 | { |
|
2408 | $expression = $query->expr()->orX(); |
|
2409 | foreach ($params as $param) { |
|
2410 | $alias = uniqid(); |
|
2411 | $query->setParameter("param$alias", $param); |
|
2412 | $expression->add( |
|
2413 | $query->expr()->gt('(' . $this->consumeSubquery($subquery) . ')', ":param$alias") |
|
2414 | ); |
|
2415 | } |
|
2416 | ||
2417 | return $query->expr()->andX( |
|
2418 | $query->expr()->exists($this->consumeSubquery($subquery)), |
|
2419 | $expression |
|
2420 | ); |
|
2421 | } |
|
2422 | ||
2423 | /** |
|
2424 | * @param \Doctrine\ORM\QueryBuilder $query |
|
@@ 2429-2444 (lines=16) @@ | ||
2426 | * @param array $params |
|
2427 | * @return Query\Expr\Andx |
|
2428 | */ |
|
2429 | private function subqueryGteExpression($query, $subquery, $params) |
|
2430 | { |
|
2431 | $expression = $query->expr()->orX(); |
|
2432 | foreach ($params as $param) { |
|
2433 | $alias = uniqid(); |
|
2434 | $query->setParameter("param$alias", $param); |
|
2435 | $expression->add( |
|
2436 | $query->expr()->gte('(' . $this->consumeSubquery($subquery) . ')', ":param$alias") |
|
2437 | ); |
|
2438 | } |
|
2439 | ||
2440 | return $query->expr()->andX( |
|
2441 | $query->expr()->exists($this->consumeSubquery($subquery)), |
|
2442 | $expression |
|
2443 | ); |
|
2444 | } |
|
2445 | ||
2446 | /** |
|
2447 | * @param \Doctrine\ORM\QueryBuilder $query |
|
@@ 2453-2468 (lines=16) @@ | ||
2450 | * @param string $alias |
|
2451 | * @return mixed |
|
2452 | */ |
|
2453 | private function subqueryLteExpression($query, $subquery, $params, $alias) |
|
2454 | { |
|
2455 | $expression = $query->expr()->orX(); |
|
2456 | foreach ($params as $param) { |
|
2457 | $alias = uniqid(); |
|
2458 | $query->setParameter("param$alias", $param); |
|
2459 | $expression->add( |
|
2460 | $query->expr()->lte('(' . $this->consumeSubquery($subquery) . ')', ":param$alias") |
|
2461 | ); |
|
2462 | } |
|
2463 | ||
2464 | return $query->expr()->andX( |
|
2465 | $query->expr()->exists($this->consumeSubquery($subquery)), |
|
2466 | $expression |
|
2467 | ); |
|
2468 | } |
|
2469 | ||
2470 | /** |
|
2471 | * @param \Doctrine\ORM\QueryBuilder $query |
|
@@ 2477-2492 (lines=16) @@ | ||
2474 | * @param string $alias |
|
2475 | * @return mixed |
|
2476 | */ |
|
2477 | private function subqueryLtExpression($query, $subquery, $params, $alias) |
|
2478 | { |
|
2479 | $expression = $query->expr()->orX(); |
|
2480 | foreach ($params as $param) { |
|
2481 | $alias = uniqid(); |
|
2482 | $query->setParameter("param$alias", $param); |
|
2483 | $expression->add( |
|
2484 | $query->expr()->lt('(' . $this->consumeSubquery($subquery) . ')', ":param$alias") |
|
2485 | ); |
|
2486 | } |
|
2487 | ||
2488 | return $query->expr()->andX( |
|
2489 | $query->expr()->exists($this->consumeSubquery($subquery)), |
|
2490 | $expression |
|
2491 | ); |
|
2492 | } |
|
2493 | ||
2494 | /** |
|
2495 | * @param \Doctrine\ORM\QueryBuilder $query |