Count example in the docs seems wrong
See original GitHub issueHello! Thanks for the great lib ^_^
I’ve been testing a bit the examples, and found out that
# Getting the total of records
db.users.count()
in the README doesn’t work for me, while db.users.find().count()
does.
Am I doing something wrong or is the docs to fix? Thank you, have the greatest day
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Word count error in Google doc
Error for word count in Google word doc. The Same document when I download in my laptop and I see the word count...
Read more >Why Does the Word Count Differ Between Programs?
For instance, Google Docs and Microsoft Office will give you two different word counts—even though the text being processed is the same!
Read more >How does the messages-count example in Meteor docs work?
The document will have two fields: a roomId with the ID of a room, and count : the total number of messages in...
Read more >Google Sheets COUNT and COUNTA functions with formula ...
Let's get right into it. What is COUNT and COUNTA in a Google spreadsheet? How to use Google Sheets COUNT and COUNTA –...
Read more >Video: Work with word counts in your document
Training: Watch this video to learn how to track the word count in your document as you work. And if you need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@davidlatwe you are right:
So the docs for the current stable are not to be found in the README, obviously, sorry. My fault.
Two things as side notes:
query_set.count()
tocollection. count_documents(query)
, as shown in: https://api.mongodb.com/python/current/tutorial.html#counting. Maybe you want to reflect this change too?I can open other issues for those if you like, and try to help out with a PR for the second one.
I’ll close this one as we’ve found I was wrong, thanks!
Yeah happy to review PR for that. I can get PyPi updated this week sometime