Documentation and case fixes in QueryBuilder
This commit is contained in:
parent
61ad1bd137
commit
7d4016a757
@ -215,7 +215,7 @@ class QueryBuilder
|
|||||||
/**
|
/**
|
||||||
* Obtain the name of the second level query cache region in which query results will be stored
|
* Obtain the name of the second level query cache region in which query results will be stored
|
||||||
*
|
*
|
||||||
* @return The cache region name; NULL indicates the default region.
|
* @return string|null The cache region name; NULL indicates the default region.
|
||||||
*/
|
*/
|
||||||
public function getCacheRegion()
|
public function getCacheRegion()
|
||||||
{
|
{
|
||||||
@ -411,7 +411,7 @@ class QueryBuilder
|
|||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @deprecated Please use $qb->getRootAliases() instead.
|
* @deprecated Please use $qb->getRootAliases() instead.
|
||||||
* @throws RuntimeException
|
* @throws \RuntimeException
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -532,12 +532,14 @@ class QueryBuilder
|
|||||||
$filteredParameters = $this->parameters->filter(
|
$filteredParameters = $this->parameters->filter(
|
||||||
function ($parameter) use ($key)
|
function ($parameter) use ($key)
|
||||||
{
|
{
|
||||||
|
/* @var Query\Parameter $parameter */
|
||||||
// Must not be identical because of string to integer conversion
|
// Must not be identical because of string to integer conversion
|
||||||
return ($key == $parameter->getName());
|
return ($key == $parameter->getName());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (count($filteredParameters)) {
|
if (count($filteredParameters)) {
|
||||||
|
/* @var Query\Parameter $parameter */
|
||||||
$parameter = $filteredParameters->first();
|
$parameter = $filteredParameters->first();
|
||||||
$parameter->setValue($value, $type);
|
$parameter->setValue($value, $type);
|
||||||
|
|
||||||
@ -611,6 +613,7 @@ class QueryBuilder
|
|||||||
$filteredParameters = $this->parameters->filter(
|
$filteredParameters = $this->parameters->filter(
|
||||||
function ($parameter) use ($key)
|
function ($parameter) use ($key)
|
||||||
{
|
{
|
||||||
|
/* @var Query\Parameter $parameter */
|
||||||
// Must not be identical because of string to integer conversion
|
// Must not be identical because of string to integer conversion
|
||||||
return ($key == $parameter->getName());
|
return ($key == $parameter->getName());
|
||||||
}
|
}
|
||||||
@ -675,9 +678,9 @@ class QueryBuilder
|
|||||||
* The available parts are: 'select', 'from', 'join', 'set', 'where',
|
* The available parts are: 'select', 'from', 'join', 'set', 'where',
|
||||||
* 'groupBy', 'having' and 'orderBy'.
|
* 'groupBy', 'having' and 'orderBy'.
|
||||||
*
|
*
|
||||||
* @param string $dqlPartName
|
* @param string $dqlPartName The DQL part name.
|
||||||
* @param Expr\Base $dqlPart
|
* @param object|array $dqlPart An Expr object.
|
||||||
* @param bool $append
|
* @param bool $append Whether to append (true) or replace (false).
|
||||||
*
|
*
|
||||||
* @return QueryBuilder This QueryBuilder instance.
|
* @return QueryBuilder This QueryBuilder instance.
|
||||||
*/
|
*/
|
||||||
@ -915,6 +918,7 @@ class QueryBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->_dqlParts['from'] as &$fromClause) {
|
foreach ($this->_dqlParts['from'] as &$fromClause) {
|
||||||
|
/* @var Expr\From $fromClause */
|
||||||
if ($fromClause->getAlias() !== $alias) {
|
if ($fromClause->getAlias() !== $alias) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1130,7 +1134,7 @@ class QueryBuilder
|
|||||||
public function orWhere()
|
public function orWhere()
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$where = $this->getDqlPart('where');
|
$where = $this->getDQLPart('where');
|
||||||
|
|
||||||
if ($where instanceof Expr\Orx) {
|
if ($where instanceof Expr\Orx) {
|
||||||
$where->addMultiple($args);
|
$where->addMultiple($args);
|
||||||
@ -1210,7 +1214,7 @@ class QueryBuilder
|
|||||||
public function andHaving($having)
|
public function andHaving($having)
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$having = $this->getDqlPart('having');
|
$having = $this->getDQLPart('having');
|
||||||
|
|
||||||
if ($having instanceof Expr\Andx) {
|
if ($having instanceof Expr\Andx) {
|
||||||
$having->addMultiple($args);
|
$having->addMultiple($args);
|
||||||
@ -1233,7 +1237,7 @@ class QueryBuilder
|
|||||||
public function orHaving($having)
|
public function orHaving($having)
|
||||||
{
|
{
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$having = $this->getDqlPart('having');
|
$having = $this->getDQLPart('having');
|
||||||
|
|
||||||
if ($having instanceof Expr\Orx) {
|
if ($having instanceof Expr\Orx) {
|
||||||
$having->addMultiple($args);
|
$having->addMultiple($args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user