* @package Mammut\DB\Adapter\DB2 */ class Result extends \Mammut\DB\Result { private $result; private $count; public function __construct($result, $count) { $this->result = &$result; $this->count = $count; } public function getRowNumber() { throw new ImplementationException('not implemented'); } public function getColumnInfo($column) { throw new ImplementationException('not implemented'); } public function getColumns() { throw new ImplementationException('not implemented'); } public function getFields() { db2_num_fields($this->result); } public function getFieldTypes() { throw new ImplementationException('not implemented'); } public function getRowCount() { return $this->count; } public function fetchRow() { return db2_fetch_row($this->result); } public function fetchArray() { return db2_fetch_assoc($this->result); } public function fetchObject($class = false, $param = array()) { if($class) { return db2_fetch_object($this->result, $class, $param); } else return db2_fetch_object($this->result); } public function close() { db2_free_result($this->result); } }