protected function raiseError($message, Dao $dao = null) { $this->set('error_message', $message); if ($dao && $dao->inTransaction()) { $dao->rollBack(); } return false; }
public function __construct($message, Dao $dao = null, $sql = null) { if (!empty($dao)) { if ($dao->isDebug()) { $message .= sprintf("\nSQL: %s", $sql); } } parent::__construct($message, $dao); }
protected function executeDao(Dao $dao) { $values = array(); //first update value foreach ($this->_update_fields as $value) { $values[] = $value; } foreach ($this->_increament_fields as $field_name => $options) { $values[] = $options['value']; } //then where $values = array_merge($values, $this->getWhereValues()); return $dao->execute($values); }
protected function prepare(Dao $dao) { $sql = $this->buildStatement(); Logger::getInstance('DBAL')->addInfo("prepared sql:{$sql}"); return $dao->prepare($sql); }
protected function executeDao(Dao $dao) { $values = $this->getWhereValues(); return $dao->execute($values); }
protected function setFetchMode(Dao $dao) { if (!isset($this->_datarow_class_name)) { $this->_datarow_class_name = '\\ORC\\DAO\\Table\\DataRow'; } return $dao->setFetchMode(DAO::FETCH_CLASS | DAO::FETCH_PROPS_LATE, $this->_datarow_class_name); }