Made AddSelect varadic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
c8aee70a0b
commit
2976b39102
|
@ -452,12 +452,14 @@ class QueryBuilder implements IQueryBuilder {
|
||||||
* ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id');
|
* ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id');
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param mixed $select The selection expression.
|
* @param mixed ...$selects The selection expression.
|
||||||
*
|
*
|
||||||
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
||||||
*/
|
*/
|
||||||
public function addSelect($select = null) {
|
public function addSelect(...$selects) {
|
||||||
$selects = is_array($select) ? $select : func_get_args();
|
if (count($selects) === 1 && is_array($selects[0])) {
|
||||||
|
$selects = $selects[0];
|
||||||
|
}
|
||||||
|
|
||||||
$this->queryBuilder->addSelect(
|
$this->queryBuilder->addSelect(
|
||||||
$this->helper->quoteColumnNames($selects)
|
$this->helper->quoteColumnNames($selects)
|
||||||
|
|
|
@ -344,12 +344,12 @@ interface IQueryBuilder {
|
||||||
* ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id');
|
* ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id');
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param mixed $select The selection expression.
|
* @param mixed ...$select The selection expression.
|
||||||
*
|
*
|
||||||
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
||||||
* @since 8.2.0
|
* @since 8.2.0
|
||||||
*/
|
*/
|
||||||
public function addSelect($select = null);
|
public function addSelect(...$select);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns the query being built into a bulk delete query that ranges over
|
* Turns the query being built into a bulk delete query that ranges over
|
||||||
|
|
Loading…
Reference in New Issue