23 private $predefinedSelectParts =
46 private $resourceConnection;
51 private $objectManager;
65 $this->selectParts = $selectParts;
71 private function getSelectParts()
73 return array_merge($this->predefinedSelectParts, $this->selectParts);
86 foreach ($this->getSelectParts() as $partName) {
87 $parts[$partName] =
$select->getPart($partName);
98 $select = $this->resourceConnection->getConnection()->select();
102 foreach ($selectParts as $partName => $partValue) {
103 $select->setPart($partName, $partValue);
119 private function processColumns(
Select $select, array &$selectParts)
125 list($correlationName, $column,
$alias) = $columnEntry;
126 if (is_array($column) && !empty($column[
'class'])) {
127 $expression = $this->objectManager->create(
129 isset($column[
'arguments']) ? $column[
'arguments'] : []
131 $part[] = [$correlationName, $expression,
$alias];
133 $part[] = $columnEntry;
__construct(ResourceConnection $resourceConnection, ObjectManagerInterface $objectManager, $selectParts=[])
recreate(array $selectParts)