예제 #1
0
 def _table_rights(self, rights):
     vals = IndexedSet([
         'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES',
         'TRIGGER'
     ])
     return vals.intersection(set(rights))
예제 #2
0
 def _update_children(self):
     ids = IndexedSet([elem.id for elem in self])
     for section in self.sections:
         children = IndexedSet([id.value for id in section.children])
         children = children.intersection(ids)
         section.children = Children([ChildId(id) for id in children])