Dumplie\Inventory\Infrastructure\Doctrine\DBAL\Query\DbalInventoryQuery::skuExists PHP Method

skuExists() public method

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