added methods to MongoDriver for custom commands, findAndModify, count

This commit is contained in:
Anton Grebnev
2011-11-22 16:29:00 +04:00
parent 54b991314d
commit a87845980d
7 changed files with 156 additions and 7 deletions

View File

@ -13,6 +13,11 @@
abstract class MongoModel extends Model
{
public function count($query = array(), $limit = 0, $skip = 0)
{
return $this->db->count($this->table(), $query, $limit, $skip);
}
public function find($condition = array())
{
return $this->db->find($this->table(), $condition);