jstests/noPassthroughWithMongod/command_let_variables_merge_only.js
// Function to prepare target collection of $merge stage for testing.
Function to prepare target collection of $merge stage for testing.
Function to prepare target collection of $merge stage for testing .
function prepMergeTargetColl() {
    targetColl.drop();
    assert.commandWorked(db.runCommand({
        aggregate: coll.getName(),
        pipeline: [
            {$match: {$expr: {$eq: ["$Species", "Song Thrush (Turdus philomelos)"]}}},
            {$out: targetColl.getName()}
        ],
        cursor: {}
    }));
}
function prepMergeTargetColl ( ) { targetColl . drop ( ) ; assert . commandWorked ( db . runCommand ( { aggregate : coll . getName ( ) , pipeline : [ { $match : { $expr : { $eq : [ "$Species" , "Song Thrush (Turdus philomelos)" ] } } } , { $out : targetColl . getName ( ) } ] , cursor : { } } ) ) ; }
Function to prepare target collection of $merge stage for testing.
Function to prepare target collection of $merge stage for testing .