Skip to content

Instantly share code, notes, and snippets.

@bdiegel
Last active August 29, 2015 14:03
Show Gist options
  • Save bdiegel/da0b73bcf732627f6e25 to your computer and use it in GitHub Desktop.
Save bdiegel/da0b73bcf732627f6e25 to your computer and use it in GitHub Desktop.
Robomongo UUID configuration

Robomongo

Robomongo is a free MongoDB management tool for Mac, Linux and Windows. It has a convenient user interface and also does not sacrifice the powerful features of the mongo console.

Get the version for your platform here.

Configuration

Robomongo reads the ~/.robomongorc.js configuration script on startup.

Querying documents by UUID in the shell can be tricky. We found these configuration scripts helpful with Robomongo.

  1. Place .robomongorc.js in your User HOME directory
  2. Place uuidhelpers.js in /usr/local/share
  3. Restart Robomongo
  4. Select: Options- > Legacy UUID Encoding -> Use Python Encoding

Now you can use Python UUID notation to queries:

db.col.find({ 'myid': PYUUID("bcd51941-977f-3b18-8603-6e667dbda601") }).count()

References

You can find more information using these links.

Robomongo UUID article

Robomongo config file

UUID helper script on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment