Scheduled maintenance on Saturday, 27 September 2025, from 07:00 AM to 4:00 PM GMT (09:00 AM to 6:00 PM CEST) - some services may be unavailable -

Skip to content
Snippets Groups Projects
_RootEntity.py 722 B
Newer Older
  • Learn to ignore specific revisions
  • Lluis Gifre Renom's avatar
    Lluis Gifre Renom committed
    from typing import Any, Callable, Dict
    from ._Entity import _Entity
    from ...engines._DatabaseEngine import _DatabaseEngine
    
    class _RootEntity(_Entity):
        def __init__(self, database_engine : _DatabaseEngine, entity_uuid: str, attributes_key: str,
                     attributes_validators: Dict[str, Callable[[Any], bool]],
                     attribute_transcoders: Dict[str, Dict[Any, Callable[[Any], Any]]]):
            self._database_engine = database_engine
            super().__init__(self, entity_uuid, attributes_key, attributes_validators, attribute_transcoders)
    
        @property
        def parent(self) -> '_RootEntity': return self
    
        @property
        def database_engine(self) -> _DatabaseEngine: return self._database_engine