Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
56838bdd
Commit
56838bdd
authored
Oct 26, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed transaction records to support multiple iteration.
parent
f16879e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/FileStorage.py
+13
-2
No files found.
src/ZODB/FileStorage/FileStorage.py
View file @
56838bdd
...
...
@@ -1626,8 +1626,7 @@ class FileIterator(FileStorageFormatter):
raise
ZODB
.
interfaces
.
StorageStopIteration
()
class
TransactionRecord
(
BaseStorage
.
TransactionRecord
,
FileStorageFormatter
):
"""Iterate over the transactions in a FileStorage file."""
class
TransactionRecord
(
BaseStorage
.
TransactionRecord
):
def
__init__
(
self
,
tid
,
status
,
user
,
desc
,
ext
,
pos
,
tend
,
file
,
tpos
):
BaseStorage
.
TransactionRecord
.
__init__
(
...
...
@@ -1637,6 +1636,18 @@ class TransactionRecord(BaseStorage.TransactionRecord, FileStorageFormatter):
self
.
_file
=
file
self
.
_tpos
=
tpos
def
__iter__
(
self
):
return
TransactionRecordIterator
(
self
)
class
TransactionRecordIterator
(
FileStorageFormatter
):
"""Iterate over the transactions in a FileStorage file."""
def
__init__
(
self
,
record
):
self
.
_file
=
record
.
_file
self
.
_pos
=
record
.
_pos
self
.
_tpos
=
record
.
_tpos
self
.
_tend
=
record
.
_tend
def
__iter__
(
self
):
return
self
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment