list takes a filter

This commit is contained in:
Eliot Horowitz
2009-02-02 22:16:39 -05:00
parent c6e4f30590
commit e20f07a46e
2 changed files with 9 additions and 0 deletions

View File

@@ -94,6 +94,10 @@ namespace mongo {
return _client.query( _filesNS.c_str() , emptyObj );
}
auto_ptr<DBClientCursor> GridFS::list( BSONObj o ){
return _client.query( _filesNS.c_str() , o );
}
Chunk GridFile::getChunk( int n ){
_exists();
BSONObjBuilder b;

View File

@@ -74,6 +74,11 @@ namespace mongo {
*/
auto_ptr<DBClientCursor> list();
/**
* convenience method to get all the files with a filter
*/
auto_ptr<DBClientCursor> list( BSONObj query );
private:
DBClientBase& _client;
string _filesNS;