Esempio n. 1
0
 public function exec($fetchType = Nov\Db::FETCH_ALL)
 {
     if (is_string($this->getDb())) {
         $this->setDb(Nov\Db\PDO::factory($this->getDb()));
     }
     $this->_composeSql();
     if ($this->_type == self::_SELECT) {
         $this->_execute();
     } else {
         if ($this instanceof Nov\Db\Orm\Instance\Table) {
             $this->_triggerPre();
             $this->_execute();
             $this->_triggerPost();
         }
     }
     return $this->_fetch($fetchType);
 }