Last active
May 31, 2019 15:06
-
-
Save talesmgodois/9fcaef348491f91cd59758ed75da7fc8 to your computer and use it in GitHub Desktop.
getjus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove({role: | |
{ | |
$nin:[ | |
ObjectId('_id'), | |
ObjectId('_id2'), | |
ObjectId('_id3') | |
] | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.collection.updateMany({},{ | |
$set: { | |
read: 0 | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment