Stephen Steneker
stennie@10gen.com
1
2
Use the TAB, Luke!!

3
4
https://gist.github.com/stennie!
)!

5
edit functionname!

6
~/.mongorc.js!

7
http://skratchdot.com/projects/mongodb-schema/!

8
DBQuery.prototype._prettyShell = true;!

9
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/
Global_Objects/Date/toISOString!

10
http://stackoverflow.com/questions/8749971!

11
db.getSiblingDB(‘dbname’).collection.command!
12
www.mongodb.org/display/DOCS/dbshell+(mongo)+Reference!
13
system.js!
14
Many of the mongo shell commands are JS helpers .. call without ()!
15
https://github.com/TylerBrock/mongo-hacker!

16
• 
• 
• 
• 
• 

https://github.com/TylerBrock/mongo-hacker
https://github.com/karlseguin/MongoPlus
http://skratchdot.com/p...
Upcoming SlideShare
Loading in …5
×

MongoDB shell games: Here be dragons .. and JavaScript!

925 views

Published on

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.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
925
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MongoDB shell games: Here be dragons .. and JavaScript!

  1. 1. Stephen Steneker stennie@10gen.com 1
  2. 2. 2
  3. 3. Use the TAB, Luke!! 3
  4. 4. 4
  5. 5. https://gist.github.com/stennie! )! 5
  6. 6. edit functionname! 6
  7. 7. ~/.mongorc.js! 7
  8. 8. http://skratchdot.com/projects/mongodb-schema/! 8
  9. 9. DBQuery.prototype._prettyShell = true;! 9
  10. 10. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/ Global_Objects/Date/toISOString! 10
  11. 11. http://stackoverflow.com/questions/8749971! 11
  12. 12. db.getSiblingDB(‘dbname’).collection.command! 12
  13. 13. www.mongodb.org/display/DOCS/dbshell+(mongo)+Reference! 13
  14. 14. system.js! 14
  15. 15. Many of the mongo shell commands are JS helpers .. call without ()! 15
  16. 16. https://github.com/TylerBrock/mongo-hacker! 16
  17. 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 .. ! 17

×