문제

How it's possible to execute command convertToCapped with pymongo or, probably, native mongodb driver for python if it's not possible to do that with pymongo.

도움이 되었습니까?

해결책

Use the command method of the database object:

mongo = pymongo.MongoClient()
mongo.DBNAME.command('convertToCapped', 'COLLNAME', size=SIZE)

MongoDB's convertToCapped

pymongo's command

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top