0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
This commit is contained in:
Eliot Horowitz 2010-08-21 21:23:33 -04:00
parent 087a79e4be
commit a2f53c7ec9

View File

@ -176,11 +176,11 @@ namespace mongo {
{ // query options
if ( cmdObj["query"].type() == Object ){
filter = cmdObj["query"].embeddedObjectUserCheck();
q = filter;
}
if ( cmdObj["sort"].type() == Object )
q.sort( cmdObj["sort"].embeddedObjectUserCheck() );
if ( cmdObj["sort"].type() == Object ){
sort = cmdObj["sort"].embeddedObjectUserCheck();
}
if ( cmdObj["limit"].isNumber() )
limit = cmdObj["limit"].numberLong();
@ -222,7 +222,7 @@ namespace mongo {
// query options
BSONObj filter;
Query q;
BSONObj sort;
long long limit;
// functions
@ -444,7 +444,7 @@ namespace mongo {
readlock lock( mr.ns );
Client::Context ctx( mr.ns );
shared_ptr<Cursor> temp = bestGuessCursor( mr.ns.c_str(), mr.filter, BSONObj() );
shared_ptr<Cursor> temp = bestGuessCursor( mr.ns.c_str(), mr.filter, mr.sort );
auto_ptr<ClientCursor> cursor( new ClientCursor( QueryOption_NoCursorTimeout , temp , mr.ns.c_str() ) );
Timer mt;