Is there a way to run arbitrary command in MongoVUE - mongodb

I was looking for a way to execute an arbitrary command in MongoVUE: db.collection.runCommand(..), but was not able to find anything.
I am using the latest (at the time of asking) version 1.6.1.0. There is nothing in the context menu as well as in the main menu:
Is there a way to achieve it? If no, are there any other suitable guis for desktop (not web-based).
P.S. I know how to perform this in mongo-shell

I've run into the same limitation with the .distinct() command. It is not currently possible in MongoVUE to do anything aside from .find/.aggregate/.mapreduce. You're best off running commands out of the Mongo Shell.

Related

What code should I use? sys.exit() or some other thing I haven't found?

I'm a high school student in a class that is using Python 2 on Enthought Canopy Windows Edition. I often get stuck in coding loops, but the only way I can get out is by closing out all forms of open Enthought. Is there any more reliable way to do it? I've been using sys.exit(0), but it doesn't work correctly, and is leaving my coding in a jam. I can't even test it without it getting me stuck. Anyone know how to fix this issue?
If your code is already running, then you can't reliably type a command to stop it, because the prompt won't necessarily be live then.
Often you can use the Run menu's "Interrupt kernel" command, and you should usually be able to use "Restart kernel", though this doesn't work all the time.

How to execute update ($set) queries in MongoDB Compass tool?

I'm new to MongoDB Compass tool and am trying to update a field in my collection. Please can someone suggest where the update query must be written. Could find no options or panes in the tool to write custom queries be it selection / updation for that matter.
In the Default Window only the selection/projection/restriction options are found.
Any help is much appreciated.
In the latest version, there is a "_MongoSH" in the bottom left corner of the window.
Thx to #Boštjan Pišler for the hint about a new feature.
Old answer:
I had the same issue, it looks like a simple feature to implement (since document updates are possible) but... AFAIK there is no such option in compass, you can do it through mongodb shell (CLI client).
The tool was recently updated with a shell (currently in beta) which is accessible by clicking the dark bar on the bottom of the window "_MongoSH"
At the bottom left, _MONGOSH:
There you can call updateMany and any other methods available in the MongoSH syntax
You can use mongo MongoSH. Currently its in Beta.
Just move your mouse over a document and find a little pencil. You will enter in update mode. You can change fields, values, arrays, etc.

SQLPLUS session to remember history

I have just started using sqlplus for oracle and it is horrible, I was trying to look for ideas if anyone has any scripts written around sqlplus which stores history and and it works more like an editor.
You might want to consider using YASQL, http://sourceforge.net/projects/yasql/, which is an alternative client written in Perl.
It is pretty neat and covers most of what one would expect from a DB CLI client. It does not support everything sqlplus does, though.
What you want is the extremely handy rlwrap command. It will wrap almost any command and add readline-style command history and editing. It supports, colors, custom completions, and all that jazz. I'm not sure if the link I provided to rlwrap is the "official" source, and compiling it can sometimes be a pain, but your favorite Unix package source should have some version of it available.

How come when I push "up" on MongoDB's console, it doesn't cycle through my previous command?

Instead, it displays this:
^[[A^[[A
update to mongo 1.6+
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
(via http://groups.google.com/group/mongodb-user/browse_thread/thread/8611c444fdfe2fe0?pli=1)
It will be better if you post this question on MongoDb's mailing list with little more explanation that after which command you face this problem because this is not the normal behavior.
Here is a link that may be of some use, though I have not yet gotten it to work:
http://www.mongodbadmin.com/node/149
This seems to assume you are installing mongo from source.
You don't have readline installed, so the mongo shell falls back to a simple mode without history navigation using the arrow keys.

Eclipse Menu Item to Exec Shell Command to Console

Is is possible to create a custom menu item within eclipse that will perform a given shell command? I'm not looking to do a "run/debug" type thing, I want to simple shell out and run a given command. I am NOT looking to create a plugin either.
Right past Run/Debug, there is something called External Tools. It looks like a green play icon with a toolbox. You can set these up to run anything you like, and anything you add to favorites will appear in a drop down menu for easy execution in two clicks. This can be used to run batch scripts, so that may do the trick for you.
Here's a link to the Eclipse Helios page on external tools that may be useful.
There are already plugins for this, such as Wicked Shell
Or you should read this: http://douglasfils.blogspot.com/2007/07/terminal-shell-in-eclipse.html