本文整理汇总了PHP中Doctrine\DBAL\Query\QueryBuilder::resetQueryPart方法的典型用法代码示例。如果您正苦于以下问题:PHP QueryBuilder::resetQueryPart方法的具体用法?PHP QueryBuilder::resetQueryPart怎么用?PHP QueryBuilder::resetQueryPart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\DBAL\Query\QueryBuilder
的用法示例。
在下文中一共展示了QueryBuilder::resetQueryPart方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFilteredCountQuery
/**
* Build the count of filtered query
*
* @return QueryBuilder
*/
public function getFilteredCountQuery()
{
$this->buildFilteredQuery();
$this->currentQueryBuilder->select('COUNT(DISTINCT ' . $this->getDistinct() . ')');
$this->currentQueryBuilder->resetQueryPart('orderBy');
return $this->currentQueryBuilder;
}
示例2: resetQueryPartDelegatesToConcreteQueryBuilder
/**
* @test
*/
public function resetQueryPartDelegatesToConcreteQueryBuilder()
{
$this->concreteQueryBuilder->resetQueryPart('select')->shouldBeCalled()->willReturn($this->subject);
$this->subject->resetQueryPart('select');
}
示例3: testResetQueryPart
public function testResetQueryPart()
{
$qb = new QueryBuilder($this->conn);
$qb->select('u.*')->from('users', 'u')->where('u.name = ?');
$this->assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string) $qb);
$qb->resetQueryPart('where');
$this->assertEquals('SELECT u.* FROM users u', (string) $qb);
}
示例4: resetQueryPart
/**
* Resets a single SQL part.
*
* @param string $queryPartName
*
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
*/
public function resetQueryPart($queryPartName)
{
$this->queryBuilder->resetQueryPart($queryPartName);
return $this;
}