MongoDB for VS Code
MongoDB for VS Code lets you easily work with MongoDB directly from your VS Code environment. Using the MongoDB extension, you can:
- Connect to a MongoDB instance or cluster
- Navigate your databases and collections
- Prototype queries and aggregations
You can install the MongoDB extension from inside of VS Code via the VS Code Extension Marketplace. Help us improve the MongoDB for VS Code by posting your ideas and suggestions for improvements.
29 results found
-
Separate Terminal Instances for Different Playground Scripts
Currently, when running multiple scripts, all output is directed to the same terminal.
This could lead to a lot of confusion and difficulty in tracking the progress of individual scripts, especially when they are running concurrently.For example, when running two scripts that both output progress percentages, the output in the terminal looks like this:
Progress: [====== ] 13.70%
Progress: [===== ] 11.37%
Progress: [====== ] 13.71%
Progress: [===== ] 11.37%It's challenging to distinguish which progress percentage corresponds to which script. This issue is exacerbated when more scripts are running simultaneously.
1 vote -
Configurable playground name/path
Currently, only files ending with .mongodb or .mongodb.js are considered playgrounds. It would be helpful if this was more configurable, perhaps a regex that could be compared against the file path/name so we could consider all files within a folder as playgrounds.
1 vote -
Allow to spin up docker container with playground DB directly from VS Code
When a docker installation is detected on the system, allow to directly spin up a new mongoDB in docker and connect to it.
When that option is chosen automatically create a new container with the mongodb:latest docker image, a fixed username (e.g. "dev") and a random 16 chars password
When the port 27017 is already in use, ask the user which port the container should bind.
Then add the connection to the connections list, connect immediately and open the connection's tree item first hierarchy so I can start adding a database on the serverI want to be able to…
1 vote -
Add ability to go from Extended JSON to JS and vice-versa.
It would be nice to have a way to take an expression in EJSON and convert it to "plain" JS.
The motivativation is that sometimes we get large blocks of aggregation pipelines already in EJSON, but want to express them as JS code without EJSON, or vice-versa.
A command / shortcut / refactor method to highlight some text that is in format A and convert to format B would be nice.
{x: {$ne: {"$objectid": "AAAAAAAABBBBBBBBCCCCCCCC"}}} -------------^^^^^^^^^^^^^^^^^^ "Convert From EJSON..." {x: {$ne: ObjectId("AAAAAAAABBBBBBBBCCCCCCCC") }}
1 vote -
Query delimiter lines in playgrounds
Much like the REST Client extension allows you to add delimiters (in their case three or more #) between requests, it would be good if this extension offered something similar so that you can easily run individual queries or sets of queries in files containing multiple. So my playground looked something like below, clicking the play button when the mouse cursor is above the delimiter executes the first statement and when below the second.
use('db1')
db.collection1.find({})//////
use('db2')
db.collection2.find({})1 vote -
Handle 64bit numbers correctly
Javascript doesn't support 64bit internally, so if I try in Chrome/console: x = 285870311191169181, it becomes 285870311191169180, and the same thing happens in VS Code.
The solution would be to return a NumberLong("285870311191169181") text result.
In fact, it seems to be an issue in Compass as well... but it works in mongo shell.
Check the screenshot.1 vote -
Code linting when you save a .mongodb file
It would be nice to have the code cleaned up when you save a .mongodb file
1 vote -
New Playground Result tab for each query
When two playgrounds are run at once (e.g. two aggregations), the result of one overwrites the result of the other rather than opening a new 'Playground Result' tab.
The desired behaviour is for a new Playground Result tab to be opened per run (preferably numbered 'Playground Result 1', 'Playground Result 2', etc.
1 vote -
Translate Code
Directly translate code (MQL / SQL) to (MQL, SQL, .NET, Python...etc.) to cover all supported drivers.
1 vote
- Don't see your idea?