Mongodb Classroom image

Anil  Bist / Professional / DataBase

 
To post your Question Join Classroom
 
Lesson Topics's No:-  ||
Lessons:-PyMongo queries

PyMongo queries

Once you got a  collection  object, queries use the same syntax as in the mongo shell. Some slight differences are:

  • every key must be enclosed in brackets. For example:
db.find ( { frequencies: { $exists: true } } )

 

becomes in  pymongo  (note the  True  in uppercase):

db.find ( { "frequencies": { "$exists": True  } } )

 

objects such as object ids or ISODate are manipulated using python classes. PyMongo uses its own ObjectId class to deal with object ids, while dates use the standard datetime package. For example, if you want to query all events between 2010 and 2011, you can do: 

 
 
 
image
Anil  Bist

Skills    Mongodb

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)