mongodb shell games: here be dragons .. and javascript!
DESCRIPTION
Lightning talk on using and extending MongoDB's "mongo" interactive JavaScript shell. First presented at MongoDB Melbourne 2012: http://www.mongodb.com/events/mongodb-melbourne. This includes some basic tips & tricks through to adding plugins and other goodies. Applicable to MongoDB 2.2+, although Date.toISOString() is now a built-in in MongoDB 2.4+ due to the upgraded V8 JavaScript interpreter.TRANSCRIPT
1
Stephen Steneker [email protected]
2
3 Use the TAB, Luke!!
4
5 https://gist.github.com/stennie!)!
6 edit functionname!
7 ~/.mongorc.js!
8 http://skratchdot.com/projects/mongodb-schema/!
9 DBQuery.prototype._prettyShell = true;!
10
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString!
11 http://stackoverflow.com/questions/8749971!
12
db.getSiblingDB(‘dbname’).collection.command!
13
www.mongodb.org/display/DOCS/dbshell+(mongo)+Reference!
14
system.js!
15
Many of the mongo shell commands are JS helpers .. call without ()!
16 https://github.com/TylerBrock/mongo-hacker!
17
• https://github.com/TylerBrock/mongo-hacker • https://github.com/karlseguin/MongoPlus • http://skratchdot.com/projects/mongodb-schema/ • http://skratchdot.com/projects/mesh/ • https://gist.github.com/stennie
– https://gist.github.com/3179786 – https://gist.github.com/3144323
• Ideas? Share .. !