Doctrine\DBAL\Query\QueryBuilder::resetQueryPart PHP Method

resetQueryPart() public method

Resets a single SQL part.
public resetQueryPart ( string $queryPartName )
$queryPartName string
    public function resetQueryPart($queryPartName)
    {
        $this->sqlParts[$queryPartName] = is_array($this->sqlParts[$queryPartName]) ? array() : null;
        $this->state = self::STATE_DIRTY;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * 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;
 }
All Usage Examples Of Doctrine\DBAL\Query\QueryBuilder::resetQueryPart