Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executing commands from MongoDB Compass

Tags:

mongodb

Is it possible to execute a command such as db.eval("return new Date()") from MongoDB Compass?

Right now I see only collection query commands like filter, project, sort, etc.

like image 280
Old Geezer Avatar asked Aug 09 '18 16:08

Old Geezer


People also ask

Can we run queries in MongoDB compass?

Yes, Mongo compass provides only filter option(Query Bar) to do queries on specific collection.

How do I run a command in MongoDB?

Connect to MongoDB database Then type mongo command to run the shell. Now you are in the Mongo shell. If you want, you can run the mongo and mongod without the command prompt. To do this, go to the installation location and double click on the mongod and mongo applications.


1 Answers

Mongo compass provides only filter option (Query Bar) to do queries on specific collection :(

You can read how it works - https://docs.mongodb.com/compass/master/schema/#query-bar

like image 189
George Avatar answered Oct 13 '22 17:10

George