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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
a870c5db
Commit
a870c5db
authored
Apr 25, 2005
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grammar, spelling, English.
parent
41fc1acd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
26 deletions
+20
-26
src/transaction/interfaces.py
src/transaction/interfaces.py
+20
-26
No files found.
src/transaction/interfaces.py
View file @
a870c5db
...
...
@@ -115,9 +115,9 @@ class ITransaction(zope.interface.Interface):
def
savepoint
(
optimistic
=
False
):
"""Create a savepoint.
If the optimistic argument is true, then data managers that
don't support savepoints can be used, but an error will b
e
raised if the
savepoint is rolled back.
If the optimistic argument is true, then data managers that
don't
support savepoints can be used, but an error will be raised if th
e
savepoint is rolled back.
An ISavepoint object is returned.
"""
...
...
@@ -125,12 +125,12 @@ class ITransaction(zope.interface.Interface):
def
join
(
datamanager
):
"""Add a datamanager to the transaction.
The if the data manager supports savepoints, it must call this
*before* making any changes. If the transaction has had any
savepoints, then it will take a savepoint of the data manager
when join is called and this savepoint must reflct the state
of the data manager before any changes that caused the data
manager to join the
transaction.
If the data manager supports savepoints, it must call join *before*
making any changes: if the transaction has made any savepoints, then
the transaction will take a savepoint of the data manager when join
is called, and this savepoint must reflect the state of the data
manager before any changes that caused the data manager to join the
transaction.
The datamanager must implement the
transactions.interfaces.IDataManager interface, and be
...
...
@@ -211,16 +211,12 @@ class IDataManager(zope.interface.Interface):
"""Objects that manage transactional storage.
These objects may manage data for other objects, or they may manage
non-object storages, such as relational databases.
non-object storages, such as relational databases. For example,
a ZODB.Connection.
IDataManagerOriginal is the interface currently provided by ZODB
database connections, but the intent is to move to the newer
IDataManager.
Note that when data are modified, data managers should join a
transaction so that data can be committed when the user commits
Note that when some data is modified, that data's data manager should
join a transaction so that data can be committed when the user commits
the transaction.
"""
# Two-phase commit protocol. These methods are called by the
...
...
@@ -321,12 +317,12 @@ class IDataManagerSavepoint(zope.interface.Interface):
Datamanager savepoints are used by, and only by, transaction savepoints.
Note that data manager savepoints don't have any notion of or
responsibility for validity. It isn't the responsibility of
data-manager savepoints to prevent multiple rollbacks or rollbacks
after transaction termination. Preventing invalid savepoint
r
ollback is the responsibility of transaction rollbacks.
Application code should never
use data-manager savepoints.
Note that data manager savepoints don't have any notion of
,
or
responsibility for
,
validity. It isn't the responsibility of
data-manager savepoints to prevent multiple rollbacks or rollbacks
after
transaction termination. Preventing invalid savepoint rollback is the
r
esponsibility of transaction rollbacks. Application code should never
use data-manager savepoints.
"""
def
rollback
():
...
...
@@ -340,9 +336,7 @@ class ISavepoint(zope.interface.Interface):
def
rollback
():
"""Rollback any work done since the savepoint.
An InvalidSavepointRollbackError is raised if the savepoint
isn't valid.
InvalidSavepointRollbackError is raised if the savepoint isn't valid.
"""
valid
=
zope
.
interface
.
Attribute
(
...
...
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