public function queryTrimLog($period)
    {
        $qb = $this->createQueryBuilder();
        $qb->delete($this->getTableName())
             ->where('date < :date')
             ->setParameter('date', $period, Type::DATETIME);

        return $qb;
    }
public function queryTrimLog($period)
    {
        $qb = $this->createQueryBuilder();
        $qb->delete($this->getTableName())
             ->where('date < :date')
             ->setParameter('date', $period, Type::DATETIME);

        return $qb;
    }
public function queryTrimLog ( $ period ) { $ qb = $ this -> createQueryBuilder ( ) ; $ qb -> delete ( $ this -> getTableName ( ) ) -> where ( 'date < :date' ) -> setParameter ( 'date' , $ period , Type :: DATETIME ) ; return $ qb ; }
Build the query for a log trim.

@param \DateTime $period

@return QueryBuilder
Build the query for a log trim .