jstests/core/verify_update_mods.js
// Issues the findAndModify command and returns the response.
Issues the findAndModify command and returns the response.
Issues the findAndModify command and returns the response .
function findAndModifyCommand(coll, query, update, arrayFilters) {
    const command = {query: query, update: update, upsert: true};
    if (arrayFilters !== undefined) {
        command.arrayFilters = arrayFilters;
    }
    return coll.runCommand("findAndModify", command);
}
function findAndModifyCommand ( coll , query , update , arrayFilters ) { const command = { query : query , update : update , upsert : true } ; if ( arrayFilters !== undefined ) { command . arrayFilters = arrayFilters ; } return coll . runCommand ( "findAndModify" , command ) ; }
Issues the findAndModify command and returns the response.
Issues the findAndModify command and returns the response .