server/session.py
changeset 2840 06daf13195d4
parent 2792 135580d15d42
child 2855 1d9be3dffa94
--- a/server/session.py	Fri Aug 14 11:12:26 2009 +0200
+++ b/server/session.py	Fri Aug 14 11:13:18 2009 +0200
@@ -169,6 +169,18 @@
         assert prop == 'lang' # this is the only one changeable property for now
         self.set_language(value)
 
+    def deleted_in_transaction(self, eid):
+        return eid in self.transaction_data.get('pendingeids', ())
+
+    def added_in_transaction(self, eid):
+        return eid in self.transaction_data.get('neweids', ())
+
+    def schema_rproperty(self, rtype, eidfrom, eidto, rprop):
+        rschema = self.repo.schema[rtype]
+        subjtype = self.describe(eidfrom)[0]
+        objtype = self.describe(eidto)[0]
+        return rschema.rproperty(subjtype, objtype, rprop)
+
     # connection management ###################################################
 
     def keep_pool_mode(self, mode):