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):
...
@@ -115,9 +115,9 @@ class ITransaction(zope.interface.Interface):
def
savepoint
(
optimistic
=
False
):
def
savepoint
(
optimistic
=
False
):
"""Create a savepoint.
"""Create a savepoint.
If the optimistic argument is true, then data managers that
If the optimistic argument is true, then data managers that
don't
don't support savepoints can be used, but an error will b
e
support savepoints can be used, but an error will be raised if th
e
raised if the
savepoint is rolled back.
savepoint is rolled back.
An ISavepoint object is returned.
An ISavepoint object is returned.
"""
"""
...
@@ -125,12 +125,12 @@ class ITransaction(zope.interface.Interface):
...
@@ -125,12 +125,12 @@ class ITransaction(zope.interface.Interface):
def
join
(
datamanager
):
def
join
(
datamanager
):
"""Add a datamanager to the transaction.
"""Add a datamanager to the transaction.
The if the data manager supports savepoints, it must call this
If the data manager supports savepoints, it must call join *before*
*before* making any changes. If the transaction has had any
making any changes: if the transaction has made any savepoints, then
savepoints, then it will take a savepoint of the data manager
the transaction will take a savepoint of the data manager when join
when join is called and this savepoint must reflct the state
is called, and this savepoint must reflect the state of the data
of the data manager before any changes that caused the data
manager before any changes that caused the data manager to join the
manager to join the
transaction.
transaction.
The datamanager must implement the
The datamanager must implement the
transactions.interfaces.IDataManager interface, and be
transactions.interfaces.IDataManager interface, and be
...
@@ -211,16 +211,12 @@ class IDataManager(zope.interface.Interface):
...
@@ -211,16 +211,12 @@ class IDataManager(zope.interface.Interface):
"""Objects that manage transactional storage.
"""Objects that manage transactional storage.
These objects may manage data for other objects, or they may manage
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
Note that when some data is modified, that data's data manager should
database connections, but the intent is to move to the newer
join a transaction so that data can be committed when the user commits
IDataManager.
Note that when data are modified, data managers should join a
transaction so that data can be committed when the user commits
the transaction.
the transaction.
"""
"""
# Two-phase commit protocol. These methods are called by the
# Two-phase commit protocol. These methods are called by the
...
@@ -321,12 +317,12 @@ class IDataManagerSavepoint(zope.interface.Interface):
...
@@ -321,12 +317,12 @@ class IDataManagerSavepoint(zope.interface.Interface):
Datamanager savepoints are used by, and only by, transaction savepoints.
Datamanager savepoints are used by, and only by, transaction savepoints.
Note that data manager savepoints don't have any notion of or
Note that data manager savepoints don't have any notion of
,
or
responsibility for validity. It isn't the responsibility of
responsibility for
,
validity. It isn't the responsibility of
data-manager savepoints to prevent multiple rollbacks or rollbacks
data-manager savepoints to prevent multiple rollbacks or rollbacks
after
after transaction termination. Preventing invalid savepoint
transaction termination. Preventing invalid savepoint rollback is the
r
ollback is the responsibility of transaction rollbacks.
r
esponsibility of transaction rollbacks. Application code should never
Application code should never
use data-manager savepoints.
use data-manager savepoints.
"""
"""
def
rollback
():
def
rollback
():
...
@@ -340,9 +336,7 @@ class ISavepoint(zope.interface.Interface):
...
@@ -340,9 +336,7 @@ class ISavepoint(zope.interface.Interface):
def
rollback
():
def
rollback
():
"""Rollback any work done since the savepoint.
"""Rollback any work done since the savepoint.
An InvalidSavepointRollbackError is raised if the savepoint
InvalidSavepointRollbackError is raised if the savepoint isn't valid.
isn't valid.
"""
"""
valid
=
zope
.
interface
.
Attribute
(
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