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

      Description

      Create subclasses for all the driver classes that have async methods and handle both callback and promise returning support

      AC

      • Create wrappers that handle overload logic (options are optional usually)
      • If callback is provided use callbackify if possible to wrap the driver's API
        • When we are returning an instance of our own class ensure you capture the result and return and instance of the LegacyX version of it.
      • Add helper [Symbol.for('@@mdb.callback.toLegacy')] method to the prototype of each legacy class
      • overload the constructor to handle creating a new legacy instance from a baseClass instance

      Test AC

      • Cover methods that convert to a legacy type with unit tests that prove we always convert to the legacy version of a class

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: