Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4898

Add an estimated_count method to model classes, change count to use count_documents

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0.rc1
    • Component/s: Query
    • Labels:
    • Backwards Compatibility:
      Minor Change

      Description

      Note that the zero-argument count_documents invocation was only added to the driver recently, Mongoid should provide the empty hash explicitly as the argument.

      If Mongoid currently supports driver versions that don't implement count_documents, the respective invocation needs to fall back to count.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              neil.shweky Neil Shweky
              Reporter:
              oleg.pudeyev Oleg Pudeyev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: