8 use Psr\Log\LoggerInterface as Logger;
49 private $fetchStrategy;
93 $this->fetchStrategy = $fetchStrategy;
119 return $this->
getConnection()->fetchCol($idsSelect, $this->bindParams);
141 if ($this->totalRecords ===
null) {
143 $this->totalRecords = $this->
getConnection()->fetchOne($sql, $this->bindParams);
145 return intval($this->totalRecords);
157 return $this->select->__toString();
169 $this->fetchStmt =
null;
180 if ($this->data ===
null) {
182 $this->data = $this->fetchStrategy->fetchAll(
$select, $this->bindParams);
194 if (
null === $this->fetchStmt) {
197 $data = $this->fetchStmt->fetch();
221 return $this->
getSelect()->getConnection();
243 $this->countSqlSkipParts[
$name] = $toSkip;
256 $countSelect->reset($part);
259 $countSelect->columns(
'COUNT(*)');
__construct(\Magento\Framework\DB\Select $select, \Magento\Framework\Api\CriteriaInterface $criteria, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy)
getSelectSql($stringMode=false)
addCountSqlSkipPart($name, $toSkip=true)
addBindParam($name, $value)
if(!isset($_GET['name'])) $name