python - How do I do greater than/less than using MongoDB? -


i'm using pymongo driver.

can take @ pymongo , tell me how greater than? i"m used doing : everything.

have seen the doc ? take manual :

>>> d = datetime.datetime(2009, 11, 12, 12) >>> post in posts.find({"date": {"$lt": d}}).sort("author"): ...   post ... {u'date': datetime.datetime(2009, 11, 10, 10, 45), u'text': u'and pretty easy too!', u'_id': objectid('...'), u'author': u'eliot', u'title': u'mongodb fun'} {u'date': datetime.datetime(2009, 11, 12, 11, 14), u'text': u'another post!', u'_id': objectid('...'), u'author': u'mike', u'tags': [u'bulk', u'insert']} 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -