Commit aae93e23 authored by Vincent Pelletier's avatar Vincent Pelletier

Define & document _getDataTID on database manager.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2300 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b8c58850
......@@ -296,6 +296,25 @@ class DatabaseManager(object):
pack state (True for packed)."""
raise NotImplementedError
def _getDataTID(self, oid, tid=None, before_tid=None):
"""
Return a 2-tuple:
tid (int)
tid corresponding to received parameters
serial
tid at which actual object data is located
If 'tid is None', requested object and transaction could
not be found.
If 'serial is None', requested object exist but has no data (its creation
has been undone).
If 'tid == serial', it means that requested transaction
contains object data.
Otherwise, it's an undo transaction which did not involve conflict
resolution.
"""
raise NotImplementedError
def findUndoTID(self, oid, tid, undone_tid, transaction_object):
"""
oid
......
......@@ -455,22 +455,6 @@ class MySQLDatabaseManager(DatabaseManager):
return tid, data_serial
def _getDataTID(self, oid, tid=None, before_tid=None):
"""
Return a 2-tuple:
tid (int)
tid corresponding to received parameters
serial
tid at which actual object data is located
If 'tid is None', requested object and transaction could
not be found.
If 'serial is None', requested object exist but has no data (its creation
has been undone).
If 'tid == serial', it means that requested transaction
contains object data.
Otherwise, it's an undo transaction which did not involve conflict
resolution.
"""
result = self._getObject(oid, tid=tid, before_tid=before_tid)
if result is None:
result = (None, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment