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

Autocompletion does not trigger when the method call is not inline

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • Not Needed
    • Developer Tools

      public List<Document> queryMoviesByYear(String year) {
          AggregationPipelineConfig config = new AggregationPipelineConfig(year);
          return client
              .getDatabase("sample_mflix")
              .getCollection("movies")
              .aggregate(config.getPipeline())
              .into(new ArrayList<>());
      }
      
      class AggregationPipelineConfig {
          private final List<Bson> pipeline;
      
          public AggregationPipelineConfig(String year) {
              pipeline = List.of(
                  Aggregates.match(Filters.eq("year", year)),
                  Aggregates.group("newField",
                      Accumulators.avg("test", "$year"),
                      Accumulators.sum("test2", "$year"),
                      Accumulators.bottom("field", Sorts.ascending("year"), "$year")
                  ),
                  Aggregates.project(Projections.fields(Projections.include("year", "plot"))),
                  Aggregates.sort(Sorts.orderBy(Sorts.ascending("asd", "qwe")))
              );
          }
      
          public List<Bson> getPipeline() {
              return pipeline;
          }
      }
      

            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: