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

Clean up the abstract cursor class

    • 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... developer
      I want... to refactor the abstract cursor class: node-mongodb-native/src/cursor/abstract_cursor.ts
      So that...

      • It uses an enum instead of multiple flags like closed, killed, isDead, and better documents that usage
      • Instead of `this[kId] === Long.ZERO` checks, it relies everywhere on `this[kId]?.isZero()` 

      User Impact

      None

      Dependencies

      None

      Unknowns

      None

      Acceptance Criteria

      Implementation Requirements

      • Migrate closed, killed, isDead flags to enum
        • Document what happens when those values are being set
      • Replace or occurrences of `this[kId] === Long.ZERO` with the `this[kId]?.isZero()` check

      Documentation Requirements

      None

      Follow Up Requirements

      None

            Assignee:
            Unassigned Unassigned
            Reporter:
            alena.khineika@mongodb.com Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: