MongoDB support in scratch files

Answered

I can create a scratch file ending in ".sql" that I can then connect to a new or existing session from a SQL datasource.

Is there a way to do the same thing for MongoDB?  

 

This question is similar, and I haven't tried the sym-link workaround yet, but could be promising
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009396680-Is-it-possible-to-share-the-query-console-between-different-datasources-

0
5 comments

Do you want to create scratch files to MongoSQL or MongoDB JavaScript syntax?

0

Not the OP, but basically the same question. In my case, I'd like to save a ".js" file to run MongoDb javascript syntax using Datagrip the same way I can do when I open a MongoDb console. Is there a way to do that?

 

In a related question: Is there a way to make the default return format to be json as opposed to the table format and without having to click on the 'eye' icon to change every time?

0

Hi Renato Steinberg, it is not possible yet with MongoDB JavaScript syntax. Please create a new ticket on our tracker to support it.

Related question: please follow DBE-11482.

0

I was assuming MongoDB JavaScript syntax... would MongoSQL work?  

 

Note:  The sym-link thing is pretty slick.  It's hacky to set up, but then it does seem to mostly work.  

0

Skazzyy, we will add MongoSQL syntax in the future release (2022.3), so you should be able to use it for Scratch files.

0

Please sign in to leave a comment.