I have a Document using mongoengine + mongodb as backend.
and i want to get the next available counter.
class Master(Document):
mas_id = SequenceField(required=True, primary_key=True)
in document there are 3 records. is there any i can find the next counter which is 4.
count + 1 is not required here.
there are tables mongoengine.counters but cant access it.
You could query it via pymongo, alternatively if you haven’t deleted anything then max
mas_id+ 1 is the next in the sequence, what / how is this required and what are you trying to do?