mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
16 lines
329 B
JavaScript
16 lines
329 B
JavaScript
// Test a query with 200 $or clauses
|
|
|
|
t = db.jstests_orf;
|
|
t.drop();
|
|
|
|
a = [];
|
|
for( var i = 0; i < 200; ++i ) {
|
|
a.push( {_id:i} );
|
|
}
|
|
a.forEach( function( x ) { t.save( x ); } );
|
|
|
|
explain = t.find( {$or:a} ).explain();
|
|
assert.eq( 200, explain.n );
|
|
assert.eq( 200, explain.clauses.length );
|
|
assert.eq( 200, t.count( {$or:a} ) );
|