• Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 6.6.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 0
    • Not Needed
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a Node driver engineer,
      I want simpler index management internals,
      So that it is easier to maintain our index management code in the future.

      User Impact

      • n/a - internal refactor

      Dependencies

      • n/a

      Unknowns

      • n/a

      Acceptance Criteria

      Implementation Requirements

      • Convert index_management.test.js to Typescript
      • Convert index_management.test.js to async/await
      • Remove the `EnsureIndex` class
        • This class is unused and marked internal.
      • Remove the `CreateIndexOperation` class
        • Rationale: this class is a subclass of CreateIndexesOperation that only does two things:
          • maps the input type of `Collection.createIndex()` to the input type of `Collection.createIndexes()`
          • returns the first item in the list of returned indexes
        • Now that we're using async-await, this can easily be removed and we can simply await the result of executing a `CreateIndexesOperation` and return the first item in the array in the collection's `CreateIndex` helper.
      • Remove the three `ListIndexes` wrappers:
        • IndexInformationOperation, IndexExistsOperation and IndexesOperation all perform a `Collection.listIndexes(..).toArray()` internally, and then transform the response.  We can remove these classes and instead operate directly on the result of `listIndexes(..).toArray()`.

      Testing Requirements

      • ensure all tests pass.

      Documentation Requirements

      • n/a

      Follow Up Requirements

      • n/a

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: