fetch() public method

public fetch ( )
Exemplo n.º 1
0
 /**
  * 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());
 }
Exemplo n.º 2
0
 /**
  * @param  NSelection $selection
  * @return Entity|NULL
  */
 protected function createEntityFromSelection(NSelection $selection)
 {
     $row = $selection->fetch();
     return $row === FALSE ? NULL : $this->createEntity($row);
 }
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 4
0
Arquivo: DB.php Projeto: lohini/cf
 /**
  * Fetches and returns the result data.
  *
  * @return array
  */
 public function fetch()
 {
     throw $this->selection->fetch();
     //return $this->data = $this->df->fetchAll();
 }
Exemplo n.º 5
0
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
Exemplo n.º 6
0
 private function fetch(Selection $selection)
 {
     if ((bool) $this->as_pairs) {
         return $selection->fetchPairs($this->pairs[0], $this->pairs[1]);
     } else {
         return $selection->fetch();
     }
 }