Support Select/SelectMany/Where index overloads in LINQ provider

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.8.0
    • Affects Version/s: None
    • Component/s: LINQ3
    • Hide

      Summary of necessary driver changes

      •  $map and $filter get a new option, arrayIndexAs. Similar to as, this is used to specify the variable name that the index of the current element is assigned to.
      • $reduce gets three new options: as, arrayIndexAs, valueAs
      • New variables are introduced: $$THIS and $VALUE are introduced as aliases for the existing $$this and $$value variables and added to improve consistency with other variables that are uppercase (e.g. $$KEEP, $$REMOVE).
      • The new $$IDX variable is introduced to contain the index value if indexValueAs is not used.
      • Drivers with aggregation pipeline builders need to add support for the new options, and for the new variables if they use an enum to specify valid system variables.

      Context for other referenced/linked tickets

      Show
      Summary of necessary driver changes   $map and $filter get a new option, arrayIndexAs . Similar to as , this is used to specify the variable name that the index of the current element is assigned to. $reduce gets three new options: as , arrayIndexAs , valueAs New variables are introduced: $$THIS and $VALUE are introduced as aliases for the existing $$this and $$value variables and added to improve consistency with other variables that are uppercase (e.g. $$KEEP , $$REMOVE ). The new $$IDX variable is introduced to contain the index value if indexValueAs is not used. Drivers with aggregation pipeline builders need to add support for the new options, and for the new variables if they use an enum to specify valid system variables. Context for other referenced/linked tickets  Syntax document: https://docs.google.com/document/d/1V0RwknDCgEEo6ueZLnZyRU_yt3gs9lNm7d37dzI8uN0/edit?tab=t.0
    • None
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      Communicate that the index overloads of Select/SelectMany/Where are now supported in LINQ.

      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      Yes, we can add examples using the index overloads in our LINQ docs. 

      3. Which versions of the driver/connector does this apply to?
      c# driver 3.8+ Also these overloads will only work for queries running against a 8.3 server.

      Show
      1. What would you like to communicate to the user about this feature? Communicate that the index overloads of Select/SelectMany/Where are now supported in LINQ. 2. Would you like the user to see examples of the syntax and/or executable code and its output? Yes, we can add examples using the index overloads in our LINQ docs.  3. Which versions of the driver/connector does this apply to? c# driver 3.8+ Also these overloads will only work for queries running against a 8.3 server.
    • None
    • None
    • None
    • None
    • None
    • None

      This ticket was split from DRIVERS-2810, please see that ticket for a detailed description.

            Assignee:
            Adelin Mbida Owona
            Reporter:
            TPM Jira Automations Bot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: