Пример #1
0
 /**
  * @return int|mixed
  */
 public function key()
 {
     if (null !== $this->keyDataMapper) {
         $mapper = $this->keyDataMapper;
         return $mapper($this->currentFetchedRow);
     } else {
         return parent::key();
     }
 }
Пример #2
0
 /**
  * @param array $fields
  * @return ValuesQuerySet
  */
 public function values(array $fields = null)
 {
     $qs = new ValuesQuerySet($this->metadata, $this->qb, $this->db, $fields);
     if ($this->joinMaxDepth) {
         $qs->_setJoinDepth($this->joinMaxDepth);
     } elseif (!empty($this->relatedSelectFields)) {
         $qs->_addRelatedSelectFields($this->relatedSelectFields);
     }
     return $qs;
 }