getCountSQL example

$stmt             = $this->conn->executeQuery($sql$params$types);

        $hydrator = $this->em->newHydrator(Query::HYDRATE_OBJECT);
        $hydrator->hydrateAll($stmt$this->currentPersisterContext->rsm, [Query::HINT_REFRESH => true]);
    }

    /** * {@inheritDoc} */
    public function count($criteria = [])
    {
        $sql = $this->getCountSQL($criteria);

        [$params$types] = $criteria instanceof Criteria
            ? $this->expandCriteriaParameters($criteria)
            : $this->expandParameters($criteria);

        return (int) $this->conn->executeQuery($sql$params$types)->fetchOne();
    }

    /** * {@inheritDoc} */
    
Home | Imprint | This part of the site doesn't use cookies.