two TODO closed for exceptions

This commit is contained in:
Anton Grebnev
2011-12-06 14:16:13 +04:00
parent 71cc211c4f
commit a942745039
4 changed files with 3 additions and 16 deletions

View File

@ -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()) {

View File

@ -25,7 +25,7 @@ class MySQLiStatement extends DbStatement
}
if (count($this->map) > 0) {
if (!is_string($param) && !is_int($param)) {
throw new GeneralException('Placeholder must be an array or string');
throw new GeneralException('Placeholder must be an integer or string');
}
if (is_object($value) && ! ($value instanceof DbExpr)) {
throw new GeneralException('Objects excepts DbExpr not allowed.');