resetQueryParts() public method

Resets SQL parts.
public resetQueryParts ( array | null $queryPartNames = null )
$queryPartNames array | null
 /**
  * @test
  */
 public function resetQueryPartsDelegatesToConcreteQueryBuilder()
 {
     $this->concreteQueryBuilder->resetQueryParts(['select', 'from'])->shouldBeCalled()->willReturn($this->subject);
     $this->subject->resetQueryParts(['select', 'from']);
 }
Esempio n. 2
0
 /**
  * Resets SQL parts.
  *
  * @param array|null $queryPartNames
  *
  * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
  */
 public function resetQueryParts($queryPartNames = null)
 {
     $this->queryBuilder->resetQueryParts($queryPartNames);
     return $this;
 }
 public function testResetQueryParts()
 {
     $qb = new QueryBuilder($this->conn);
     $qb->select('u.*')->from('users', 'u')->where('u.name = ?')->orderBy('u.name');
     $this->assertEquals('SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string) $qb);
     $qb->resetQueryParts(array('where', 'orderBy'));
     $this->assertEquals('SELECT u.* FROM users u', (string) $qb);
 }
Esempio n. 4
0
 /**
  * Resets SQL parts.
  *
  * @param array|null $queryPartNames
  *
  * @return QueryBuilder This QueryBuilder instance.
  */
 public function resetQueryParts(array $queryPartNames = null) : QueryBuilder
 {
     $this->concreteQueryBuilder->resetQueryParts($queryPartNames);
     return $this;
 }