mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
try to fix distinct
This commit is contained in:
parent
401bcd044c
commit
90d73f012a
@ -1505,14 +1505,13 @@ namespace mongo {
|
||||
}
|
||||
|
||||
assert( size <= 0x7fffffff );
|
||||
BSONObjBuilder b( (int) size );
|
||||
int n=0;
|
||||
|
||||
BSONArrayBuilder b( result.subarrayStart( "values" ) );
|
||||
for ( set<BSONElement,BSONElementCmpWithoutField>::iterator i = map.begin() ; i != map.end(); i++ ){
|
||||
b.appendAs( *i , b.numStr( n++ ).c_str() );
|
||||
b.append( *i );
|
||||
}
|
||||
|
||||
result.appendArray( "values" , b.obj() );
|
||||
|
||||
b.done();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1662,7 +1662,7 @@ namespace mongo {
|
||||
}
|
||||
|
||||
BSONArrayBuilder& append(const BSONElement& e){
|
||||
_b.appendAs(e, num().c_str());
|
||||
_b.appendAs(e, num());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user