class documentation
class MongoEngineBaseDocument(SerializableDocument): (source)
Known subclasses: fiftyone.core.odm.document.BaseDocument
, fiftyone.core.odm.embedded_document.BaseEmbeddedDocument
Mixin for all mongoengine:mongoengine.base.BaseDocument
subclasses that implements the SerializableDocument
interface.
Class Method | from |
Loads the document from a BSON/JSON dictionary. |
Method | __deepcopy__ |
Undocumented |
Method | __delattr__ |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | clear |
Clears the field from the document. |
Method | field |
Undocumented |
Method | field |
Undocumented |
Method | get |
Gets the field of the document. |
Method | has |
Determines whether the document has a field of the given name. |
Method | set |
Sets the value of a field of the document. |
Method | to |
Serializes this document to a BSON/JSON dictionary. |
Property | field |
An ordered tuple of the public fields of this document. |
Method | _get |
Undocumented |
Method | _get |
Returns an ordered tuple of field names of this document. |
Method | _get |
Returns an ordered tuple of field names that should be included in the repr of the document. |
Method | _to |
Undocumented |
Instance Variable | _fields |
Undocumented |
Inherited from SerializableDocument
:
Class Method | from |
Loads the document from a JSON string. |
Method | __eq__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | copy |
Returns a deep copy of the document. |
Method | fancy |
Generates a customizable string representation of the document. |
Method | iter |
Returns an iterator over the (name, value) pairs of the public fields of the document. |
Method | merge |
Merges the contents of the given document into this document. |
Method | to |
Serializes the document to a JSON string. |
Loads the document from a BSON/JSON dictionary.
Parameters | |
d | a dictionary |
extended:False | whether the input dictionary may contain serialized extended JSON constructs |
Returns | |
a SerializableDocument |
Clears the field from the document.
Parameters | |
field | the field name |
Raises | |
ValueError | if the field does not exist |
Gets the field of the document.
Parameters | |
field | the field name |
Returns | |
the field value | |
Raises | |
AttributeError | if the field does not exist |
Determines whether the document has a field of the given name.
Parameters | |
field | the field name |
Returns | |
True/False |
Sets the value of a field of the document.
Parameters | |
field | the field name |
value | the field value |
create:True | whether to create the field if it does not exist |
Raises | |
ValueError | if field_name is not an allowed field name or does not exist and create == False |
overridden in
fiftyone.core.odm.dataset.DatasetDocument
Serializes this document to a BSON/JSON dictionary.
Parameters | |
extended:False | whether to serialize extended JSON constructs such as ObjectIDs, Binary, etc. into JSON format |
Returns | |
a dict |
overridden in
fiftyone.core.odm.document.BaseDocument
Returns an ordered tuple of field names that should be included in the repr of the document.
Returns | |
a tuple of field names |