public function getProductPositionsByQuery($query)
    {
        if (is_object($query)) {
            $query = $query->getId();
        }

        $select = $this->getBaseSelect()
            ->where('query_id = ?', (int) $query)
            ->where('position IS NOT NULL')
            ->columns(['product_id', 'position'])
            ->order('position');

        return $this->getConnection()->fetchPairs($select);
    }
public function getProductPositionsByQuery($query)
    {
        if (is_object($query)) {
            $query = $query->getId();
        }

        $select = $this->getBaseSelect()
            ->where('query_id = ?', (int) $query)
            ->where('position IS NOT NULL')
            ->columns(['product_id', 'position'])
            ->order('position');

        return $this->getConnection()->fetchPairs($select);
    }
public function getProductPositionsByQuery ( $ query ) { if ( is_object ( $ query ) ) { $ query = $ query -> getId ( ) ; } $ select = $ this -> getBaseSelect ( ) -> where ( 'query_id = ?' , ( int ) $ query ) -> where ( 'position IS NOT NULL' ) -> columns ( [ 'product_id' , 'position' ] ) -> order ( 'position' ) ; return $ this -> getConnection ( ) -> fetchPairs ( $ select ) ; }
Load product positions for the given query.

@param Query|int $query Query.

@return array
Load product positions for the given query .