Skip to content

Instantly share code, notes, and snippets.

@talesmgodois
Last active May 31, 2019 15:06
Show Gist options
  • Save talesmgodois/9fcaef348491f91cd59758ed75da7fc8 to your computer and use it in GitHub Desktop.
Save talesmgodois/9fcaef348491f91cd59758ed75da7fc8 to your computer and use it in GitHub Desktop.
getjus
/**
* Cria um array com n itens para realizar testes.
*
*/
function getArray(n, obj){
let r = [];
for(let i=0; i< n; i++){
r.push(obj);
}
return r;
}
remove({role:
{
$nin:[
ObjectId('_id'),
ObjectId('_id2'),
ObjectId('_id3')
]
}
})
db.collection.updateMany({},{
$set: {
read: 0
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment