Dumplie\Customer\Infrastructure\Doctrine\Dbal\Query\DbalCartQuery::doesCartWithIdExist PHP Method

doesCartWithIdExist() public method

public doesCartWithIdExist ( string $cartId ) : boolean
$cartId string
return boolean
    public function doesCartWithIdExist(string $cartId) : bool
    {
        $qb = $this->connection->createQueryBuilder();
        $qb->select('COUNT(*)')->from('dumplie_customer_cart')->where('id = :id')->setParameter('id', $cartId)->getSQL();
        return (bool) $this->connection->fetchColumn($qb->getSQL(), $qb->getParameters());
    }