Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3517

Improve parseIndexOptions helper function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      How are you using Mongo? What version of the server and driver are you using?

      I develop the driver

      What is the feauture/improvement you would like?

      The `parseIndexOptions` has a significant amount of tech debt requiring lots of `any` usage and doesn't have effective narrowing of the various indexSpec shapes possible (e.g, tuple, array of tuples, etc.). It also collects an unused keys property.

      What use case would this feature/improvement enable?

      It's a quick to clean up and help the next person understand what it is trying to do. It's also missing support for top-level tuple arguments: index(['name', 1])

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: