Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-376

Replace existing aggregation stage snippets with the MongoDB query API completion

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.11.1
    • Affects Version/s: None
    • Component/s: Playgrounds
    • None
    • 5
    • Needed
    • Hide

      We replaced previously used aggregation stage snippets with Stage/Query/Aggregation API completions. There are no more comment blocks for snippets.
      The MQL suggestion follows the same suggestion logic that Compass does: the `$match` stage uses the Query autocomplete, whereas for everything else we will use an unspecific set of various Aggregation expressions, BSON types, etc.
      We will not try to autocomplete generated fields, e.g. fields that are created within other fields of the pipeline. That is a hard problem to solve as with the freedom of a playground someone can be composing aggregations in many different ways, breaking down pipelines and stages into chunks that get only combined together at runtime.

      Show
      We replaced previously used aggregation stage snippets with Stage/Query/Aggregation API completions. There are no more comment blocks for snippets. The MQL suggestion follows the same suggestion logic that Compass does: the `$match` stage uses the Query autocomplete, whereas for everything else we will use an unspecific set of various Aggregation expressions, BSON types, etc. We will not try to autocomplete generated fields, e.g. fields that are created within other fields of the pipeline. That is a hard problem to solve as with the freedom of a playground someone can be composing aggregations in many different ways, breaking down pipelines and stages into chunks that get only combined together at runtime.
    • Iteration Xantic Sargo

      Replace aggregation stage snippets with Queries/Aggregations API completion and remove the `update-snippets` script.

      The logic to suggest MongoDB keywords inside stages will be simple at this point and follow the same approach we have in Compass as a guideline.

        1. IMG_9016B3D8621B-1.jpeg
          104 kB
          Alena Khineika
        2. Screenshot 2023-02-16 at 15.48.26.png
          387 kB
          Alena Khineika
        3. Screenshot 2023-02-16 at 15.48.40.png
          392 kB
          Alena Khineika

            Assignee:
            alena.khineika@mongodb.com Alena Khineika
            Reporter:
            alena.khineika@mongodb.com Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: