noc.core.mongo.fields

Module Contents

noc.core.mongo.fields.RECURSIVE_REFERENCE_CONSTANT = self
class noc.core.mongo.fields.PlainReferenceField(document_type, *args, **kwargs)

Bases: mongoengine.fields.BaseField

A reference to the document that will be automatically dereferenced on access (lazily). Maps to plain ObjectId

document_type
dereference_cached(self, value)
dereference_uncached(self, value)
set_dereference(self)
__get__(self, instance, owner)

Descriptor to allow lazy dereferencing

to_mongo(self, document)
lookup_member(self, name)
prepare_query_value(self, op, value)
set_cache(self, ttl=None)
class noc.core.mongo.fields.PlainReferenceListField

Bases: noc.core.mongo.fields.PlainReferenceField

__get__(self, instance, owner)
to_mongo(self, document)
prepare_query_value(self, op, value)
class noc.core.mongo.fields.ForeignKeyField(model, **kwargs)

Bases: mongoengine.fields.BaseField

A reference to the RDBMS” table that will be automatically dereferenced on access (lazily). Maps to integer

dereference_cached(self, value)
dereference_uncached(self, value)
set_dereference(self)
__get__(self, instance, owner)

Descriptor to allow lazy dereferencing.

__set__(self, instance, value)
to_mongo(self, document)
lookup_member(self, name)
prepare_query_value(self, op, value)
class noc.core.mongo.fields.DateField

Bases: mongoengine.fields.DateTimeField

to_mongo(self, value)
to_python(self, value)
noc.core.mongo.fields.ESC1 = __
noc.core.mongo.fields.ESC2 = ^^
class noc.core.mongo.fields.RawDictField

Bases: mongoengine.fields.DictField

validate(self, value)
to_python(self, value)
to_mongo(self, value)