MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / get_sequence_name

Method get_sequence_name

mongoengine/fields.py:2163–2174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2161 return self.value_decorator(1)
2162
2163 def get_sequence_name(self):
2164 if self.sequence_name:
2165 return self.sequence_name
2166 owner = self.owner_document
2167 if issubclass(owner, Document) and not owner._meta.get("abstract"):
2168 return owner._get_collection_name()
2169 else:
2170 return (
2171 "".join("_%s" % c if c.isupper() else c for c in owner._class_name)
2172 .strip("_")
2173 .lower()
2174 )
2175
2176 def __get__(self, instance, owner):
2177 value = super().__get__(instance, owner)

Callers 3

generateMethod · 0.95
set_next_valueMethod · 0.95
get_next_valueMethod · 0.95

Calls 3

joinMethod · 0.80
getMethod · 0.45
_get_collection_nameMethod · 0.45

Tested by

no test coverage detected