Uploaded image for project: 'MongoDB for IntelliJ Plugin'
  1. MongoDB for IntelliJ Plugin
  2. INTELLIJ-71

run a java query from the gutter icon

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Developer Tools

      When the gutter icon is clicked, it will open the DataGrip console. If there is a DataGrip console already attached for that connection, it will open it. If not, it will create an empty one.

      If the query depends on runtime parameters (for example, a Java parameter), they will be added as `var` to the query.

      Example:

       Document findDocumentByNameAndAge(String name, int minAge) {
      
      	 //Parameter values of name and minAge unknown
              Document query = new Document("name", name)
                                  .append("age", new Document("$gt", minAge));
      
              return collection.find(query).first();
          }
      
      // Enter parameter values to execute this query 
      var name = 
      var age = 
      
      db.exampleCollection.find({ "name": name, "age": { "$gt": age } });
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.mas@mongodb.com Kevin Mas Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: