Support for MongoDB queries in org-mode blocks, like so:
db.employees.count({country: "gb"}); #+RESULTS: : 15
If you’re hooked up to MELPA:
M-x package-refresh-contents M-x package-install RET ob-mongo
Alternatively just grab the single ob-mongo.el
file and install that in your preferred way.
Alpha. Safe to use, but feature-poor. It’s still better than it not existing at all. ;-)
Each block supports the following arguments:
Argument | Description | Example | Default |
---|---|---|---|
:db | Database name. | #+BEGIN_SRC mongo :db staff | None. |
:host | Host | #+BEGIN_SRC mongo :host localhost | None. |
:port | Port | #+BEGIN_SRC mongo :port 27018 | None. |
:user | Username | #+BEGIN_SRC mongo :user root | None. |
:password | Password | #+BEGIN_SRC mongo :password superword | None. |
:mongoexec | Mongo executable | #+BEGIN_SRC mongo :mongoexec mongo26 | “mongo” |
All defaults are customizable with M-x customize-group RET ob-mongo
.