/** * Fetches single row object. * * @return HyperRow|FALSE FALSE if there is no row */ public function fetch() { $activeRow = $this->selection->fetch(); if ($activeRow === FALSE) { return FALSE; } return $this->factory->createRow($activeRow, $this->selection->getName()); }
/** * @param NSelection $selection * @return Entity|NULL */ protected function createEntityFromSelection(NSelection $selection) { $row = $selection->fetch(); return $row === FALSE ? NULL : $this->createEntity($row); }
function aggregation($function) { $selection = new Selection($this->name, $this->connection); $selection->where = $this->where; $selection->parameters = $this->parameters; $selection->conditions = $this->conditions; $selection->select($function); foreach ($selection->fetch() as $val) { return $val; } }
/** * Fetches and returns the result data. * * @return array */ public function fetch() { throw $this->selection->fetch(); //return $this->data = $this->df->fetchAll(); }
group($columns,$having=''){$this->__destruct();$this->group=$columns;$this->having=$having;return$this;}function aggregation($function){$selection=new Selection($this->name,$this->connection);$selection->where=$this->where;$selection->parameters=$this->parameters;$selection->conditions=$this->conditions;$selection->select($function);foreach($selection->fetch()as$val){return$val;}}function
private function fetch(Selection $selection) { if ((bool) $this->as_pairs) { return $selection->fetchPairs($this->pairs[0], $this->pairs[1]); } else { return $selection->fetch(); } }