MongoDB with Async Python Transcripts
Chapter: Document Databases
Lecture: Queries: Logical Operators
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
We also have a couple of logical operators. Again, you can find them at the URL here at the bottom if you want to see all of them.
0:08
When we do our query passing multiple things into our find, that's always always an ""and"". So what if you want ""or""?
0:16
Well, then you need to use a slightly different version. You would use the $or and specify multiple things that go into those queries,
0:23
kind of like we did with a greater two or equal than. There's an ""and"", but I don't really ever use the ""and"" personally
0:29
because you can just put multiple things within a document query, the little prototypical document.
0:34
Maybe you've got a list and you want to process them programmatically, but again,
0:39
in Python that's also different. We have not and nor as well. So you can go see all of them here.
0:45
Really the one that I find I've most frequently used is the or version.