Commit 2ed974e6 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add loadEx prototype.

Version support is not implemented, always return an empty version string.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1825 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 84d4e083
...@@ -119,6 +119,12 @@ class Storage(BaseStorage.BaseStorage, ...@@ -119,6 +119,12 @@ class Storage(BaseStorage.BaseStorage,
def commitVersion(self, src, dest, transaction): def commitVersion(self, src, dest, transaction):
return self.app.commitVersion(src, dest, transaction) return self.app.commitVersion(src, dest, transaction)
def loadEx(self, oid, version):
try:
return self.app.loadEx(oid=oid, version=version)
except NEOStorageNotFoundError:
raise POSException.POSKeyError(oid)
def __len__(self): def __len__(self):
return self.app.getStorageSize() return self.app.getStorageSize()
......
...@@ -979,6 +979,10 @@ class Application(object): ...@@ -979,6 +979,10 @@ class Application(object):
raise StorageTransactionError(self, transaction) raise StorageTransactionError(self, transaction)
return '', [] return '', []
def loadEx(self, oid, version):
data, serial = self.load(oid=oid)
return data, serial, ''
def __del__(self): def __del__(self):
"""Clear all connection.""" """Clear all connection."""
# Due to bug in ZODB, close is not always called when shutting # Due to bug in ZODB, close is not always called when shutting
......
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