Made select varadic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
3cae276149
commit
c8aee70a0b
2 changed files with 7 additions and 5 deletions
|
@ -379,12 +379,14 @@ class QueryBuilder implements IQueryBuilder {
|
||||||
* ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id');
|
* ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id');
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param mixed $select The selection expressions.
|
* @param mixed ...$selects The selection expressions.
|
||||||
*
|
*
|
||||||
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
|
||||||
*/
|
*/
|
||||||
public function select($select = null) {
|
public function select(...$selects) {
|
||||||
$selects = is_array($select) ? $select : func_get_args();
|
if (count($selects) === 1 && is_array($selects[0])) {
|
||||||
|
$selects = $selects[0];
|
||||||
|
}
|
||||||
|
|
||||||
$this->queryBuilder->select(
|
$this->queryBuilder->select(
|
||||||
$this->helper->quoteColumnNames($selects)
|
$this->helper->quoteColumnNames($selects)
|
||||||
|
|
|
@ -292,12 +292,12 @@ interface IQueryBuilder {
|
||||||
* ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id');
|
* ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id');
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param mixed $select The selection expressions.
|
* @param mixed ...$selects The selection expressions.
|
||||||
*
|
*
|
||||||
* @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 select($select = null);
|
public function select(...$selects);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies an item that is to be returned with a different name in the query result.
|
* Specifies an item that is to be returned with a different name in the query result.
|
||||||
|
|
Loading…
Reference in a new issue