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

Refactor CommandOperation to use an async command method

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 6.0.0
    • Affects Version/s: None
    • Component/s: None
    • 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 user
      I want... CommandOperation to use async syntax
      So that... the driver is closer to generating async stack traces

      User Impact

      This is an internal change

      Dependencies

      • None

      Unknowns

      Acceptance Criteria

      Implementation Requirements

      • Add a new CommandOperation subclass of AbstractOperation
        • rename the existing class CommandCallbackOperation
      • In CommandOperation, change executeCommand method to run async
        • rename executeCommand to executeCommandAsync
        • change server.command to server.commandAsync, remove the callback argument, and await it
        • change executeCommand to no longer take a callback
      • Modify all operations to subclass CommandCallbackOperation

      Testing Requirements

      • Add a test to see that an operation invokes executeCommandAsync when subclassing from CommandOperation

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            malik.javaid@mongodb.com Malik Javaid (Inactive)
            Reporter:
            malik.javaid@mongodb.com Malik Javaid (Inactive)
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: