Skip to content
Snippets Groups Projects
Commit c640d3e8 authored by joe's avatar joe
Browse files

Added the creation of the __timestamp__ reserved entity

parent c24bd879
No related branches found
No related tags found
No related merge requests found
......@@ -169,10 +169,15 @@ class Schema(object):
raise exceptions.SchemaError(
'invalid entity name "%s"' % tname)
self.entities[tname] = Entity(tname, tdata)
self._add_timestamp()
self._relation_check()
self.default_acl = acl.AclMixin()
self.default_acl.set_acl(DEFAULT_ACL)
def _add_timestamp(self):
ts_schema = {'name': { 'type': 'string', 'size': 16}, 'ts': {'type': 'int', 'nullable': False } }
self.entities['__timestamp__'] = Entity('__timestamp__', ts_schema)
def _relation_check(self):
"""Verify that all relations reference existing entities."""
seen = set()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment