|
|
@ -33,17 +33,11 @@ abstract class MongoModel extends Model |
|
|
|
return $this->db->delete($this->table(), array('_id' => $id)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @TODO: test method |
|
|
|
*/ |
|
|
|
public function deleteAll($query = array()) |
|
|
|
{ |
|
|
|
$this->db->delete($this->table(), $query); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @TODO: check for limits (if just one record needed) |
|
|
|
*/ |
|
|
|
protected function fetchField($data, $params = array(), $field, $cache_key = null) |
|
|
|
{ |
|
|
|
if (!$cache_key || !$result = $cache_key->get()) { |
|
|
@ -55,9 +49,6 @@ abstract class MongoModel extends Model |
|
|
|
return $result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @TODO: check for limits (if just one record needed) |
|
|
|
*/ |
|
|
|
protected function fetch($data, $params = array(), $cache_key = null) |
|
|
|
{ |
|
|
|
if (!$cache_key || !$result = $cache_key->get()) { |
|
|
|