Пример #1
0
 /**
  * @inheritdoc
  */
 public function run($as = \PDO::FETCH_CLASS)
 {
     $res = $this->db->rawQuery($this->getQuery(), $this->params, $as, $this->objectName);
     if ($this->single) {
         return !empty($res[0]) ? $res[0] : false;
     } else {
         return $res;
     }
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function decrement($name, $offset = 1)
 {
     return $this->driver->update($this->table, ['value' => 'value-' . $offset], 'name="' . $name . '"');
 }