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

Remove executeOperation's callback overload and maybeCallback

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.4.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • 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 driver engineer
      I want to reduce the tech debt in executeOperation supporting callbacks
      So that modifying executeOperation does not require maintaining a legacy use case

      User Impact

      • None, callbacks are not available to the public API, this is an internal change

      Dependencies

      • Parts of the driver that use the callback form:
        • Bulk operations, common.ts 3 usages insert/update/delete
        • endTransaction, sessions.ts 2 usages, runs command and retries if a certain error is returned

      Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • Convert usages in "Dependencies" to .then/.catch
      • remove executeOperation and maybeCallback
      • rename executeOperationAsync to executeOperation and export it

      Testing Requirements

      • All existing tests should pass
      • Remove unit tests for maybeCallback

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: