Commit ecae906c authored by Éloi Rivard's avatar Éloi Rivard

Brought documentation at the same place

parent be47be34
====================== ================
For developers of ZODB Developers notes
====================== ================
Building Building
======== ========
......
.. include:: ../src/ZODB/ConflictResolution.rst
.. include:: ../CHANGES.rst
.. include:: ../HISTORY.rst
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
Collabortation Diagrams Collabortation Diagrams
======================= =======================
.. caution::
This document hasn't been reviewed since 2005
and is likely out of date.
This file contains several collaboration diagrams for the ZODB. This file contains several collaboration diagrams for the ZODB.
Simple fetch, modify, commit Simple fetch, modify, commit
......
.. include:: ../src/ZODB/cross-database-references.rst
.. include:: ../DEVELOPERS.rst
=============
Event support Event support
=============
Sometimes, you want to react when ZODB does certain things. In the Sometimes, you want to react when ZODB does certain things. In the
past, ZODB provided ad hoc hook functions for this. Going forward, past, ZODB provided ad hoc hook functions for this. Going forward,
......
.. include:: ../src/ZODB/historical_connections.rst
...@@ -30,8 +30,18 @@ Learning more ...@@ -30,8 +30,18 @@ Learning more
introduction introduction
tutorial tutorial
guide/index guide/index
reference/index
articles/index articles/index
ConflictResolution
collaborations
cross-database-references
event
historical_connections
persistentclass
subtransactions
utils
developers
changelog
reference/index
* `The ZODB Book (in progress) <http://zodb.readthedocs.org/en/latest/>`_ * `The ZODB Book (in progress) <http://zodb.readthedocs.org/en/latest/>`_
......
.. include:: ../src/ZODB/persistentclass.rst
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
Subtransactions in ZODB 3 Subtransactions in ZODB 3
========================= =========================
.. caution::
This document hasn't been reviewed since 2005
and is likely out of date.
ZODB 3 provides limited support for subtransactions. Subtransactions ZODB 3 provides limited support for subtransactions. Subtransactions
are nested to *one* level. There are top-level transactions and are nested to *one* level. There are top-level transactions and
subtransactions. When a transaction is committed, a flag is passed subtransactions. When a transaction is committed, a flag is passed
......
.. include:: ../src/ZODB/utils.rst
...@@ -69,7 +69,7 @@ It isn't valid to create references outside a multi database: ...@@ -69,7 +69,7 @@ It isn't valid to create references outside a multi database:
>>> tm.abort() >>> tm.abort()
Databases for new objects Databases for new objects
------------------------- =========================
Objects are normally added to a database by making them reachable from Objects are normally added to a database by making them reachable from
an object already in the database. This is unambiguous when there is an object already in the database. This is unambiguous when there is
...@@ -142,7 +142,7 @@ This the most explicit and thus the best way, when practical, to avoid ...@@ -142,7 +142,7 @@ This the most explicit and thus the best way, when practical, to avoid
the ambiguity. the ambiguity.
Dissallowing implicit cross-database references Dissallowing implicit cross-database references
----------------------------------------------- ===============================================
The database contructor accepts a xrefs keyword argument that defaults The database contructor accepts a xrefs keyword argument that defaults
to True. If False is passed, the implicit cross database references to True. If False is passed, the implicit cross database references
...@@ -173,7 +173,7 @@ the other way around. ...@@ -173,7 +173,7 @@ the other way around.
>>> transaction.abort() >>> transaction.abort()
NOTE NOTE
---- ====
This implementation is incomplete. It allows creating and using This implementation is incomplete. It allows creating and using
cross-database references, however, there are a number of facilities cross-database references, however, there are a number of facilities
......
...@@ -177,7 +177,7 @@ until we sync: ...@@ -177,7 +177,7 @@ until we sync:
'red' 'red'
Instances of Persistent Classes Instances of Persistent Classes
------------------------------- ===============================
We can, of course, store instances of persistent classes in the We can, of course, store instances of persistent classes in the
database: database:
...@@ -196,7 +196,7 @@ NOTE: If a non-persistent instance of a persistent class is copied, ...@@ -196,7 +196,7 @@ NOTE: If a non-persistent instance of a persistent class is copied,
Persistent instances of persistent classes Persistent instances of persistent classes
------------------------------------------ ==========================================
Persistent instances of persistent classes are handled differently Persistent instances of persistent classes are handled differently
than normal instances. When we copy a persistent instances of a than normal instances. When we copy a persistent instances of a
...@@ -267,7 +267,7 @@ Now, we can read the object: ...@@ -267,7 +267,7 @@ Now, we can read the object:
'blue' 'blue'
Copying Copying
------- =======
If we copy an instance via export/import, the copy and the original If we copy an instance via export/import, the copy and the original
share the same class: share the same class:
......
...@@ -156,6 +156,6 @@ class ExampleClass(object): ...@@ -156,6 +156,6 @@ class ExampleClass(object):
def test_suite(): def test_suite():
suite = unittest.defaultTestLoader.loadTestsFromName(__name__) suite = unittest.defaultTestLoader.loadTestsFromName(__name__)
suite.addTest( suite.addTest(
doctest.DocFileSuite('../utils.txt', checker=checker) doctest.DocFileSuite('../utils.rst', checker=checker)
) )
return suite return suite
...@@ -394,7 +394,7 @@ def test_suite(): ...@@ -394,7 +394,7 @@ def test_suite():
manuel.doctest.Manuel(checker=ZODB.tests.util.checker) manuel.doctest.Manuel(checker=ZODB.tests.util.checker)
+ manuel.footnote.Manuel() + manuel.footnote.Manuel()
+ manuel.capture.Manuel(), + manuel.capture.Manuel(),
'../ConflictResolution.txt', '../ConflictResolution.rst',
setUp=setUp, tearDown=tearDown setUp=setUp, tearDown=tearDown
), ),
doctest.DocTestSuite( doctest.DocTestSuite(
......
...@@ -183,13 +183,13 @@ def tearDownDbs(test): ...@@ -183,13 +183,13 @@ def tearDownDbs(test):
def test_suite(): def test_suite():
return unittest.TestSuite(( return unittest.TestSuite((
doctest.DocFileSuite( doctest.DocFileSuite(
'../cross-database-references.txt', '../cross-database-references.rst',
globs=dict(MyClass=MyClass), globs=dict(MyClass=MyClass),
tearDown=tearDownDbs, tearDown=tearDownDbs,
checker=ZODB.tests.util.checker, checker=ZODB.tests.util.checker,
), ),
doctest.DocFileSuite( doctest.DocFileSuite(
'../cross-database-references.txt', '../cross-database-references.rst',
globs=dict(MyClass=MyClass_w_getnewargs), globs=dict(MyClass=MyClass_w_getnewargs),
tearDown=tearDownDbs, tearDown=tearDownDbs,
checker=ZODB.tests.util.checker, checker=ZODB.tests.util.checker,
......
...@@ -20,6 +20,6 @@ def test_suite(): ...@@ -20,6 +20,6 @@ def test_suite():
return manuel.testing.TestSuite( return manuel.testing.TestSuite(
manuel.doctest.Manuel(checker=ZODB.tests.util.checker) + manuel.doctest.Manuel(checker=ZODB.tests.util.checker) +
manuel.footnote.Manuel(), manuel.footnote.Manuel(),
'../historical_connections.txt', '../historical_connections.rst',
setUp=ZODB.tests.util.setUp, tearDown=ZODB.tests.util.tearDown, setUp=ZODB.tests.util.setUp, tearDown=ZODB.tests.util.tearDown,
) )
...@@ -87,7 +87,7 @@ def tearDown(test): ...@@ -87,7 +87,7 @@ def tearDown(test):
def test_suite(): def test_suite():
return unittest.TestSuite(( return unittest.TestSuite((
doctest.DocFileSuite( doctest.DocFileSuite(
"../persistentclass.txt", "../persistentclass.rst",
setUp=setUp, tearDown=tearDown, setUp=setUp, tearDown=tearDown,
checker=ZODB.tests.util.checker), checker=ZODB.tests.util.checker),
doctest.DocTestSuite(setUp=setUp, tearDown=tearDown), doctest.DocTestSuite(setUp=setUp, tearDown=tearDown),
......
ZODB Utilits Module =====================
=================== ZODB Utilities Module
=====================
The ZODB.utils module provides a number of helpful, somewhat random The ZODB.utils module provides a number of helpful, somewhat random
:), utility functions. :), utility functions.
...@@ -10,7 +11,7 @@ This document documents a few of them. Over time, it may document ...@@ -10,7 +11,7 @@ This document documents a few of them. Over time, it may document
more. more.
64-bit integers and strings 64-bit integers and strings
--------------------------------- ===========================
ZODB uses 64-bit transaction ids that are typically represented as ZODB uses 64-bit transaction ids that are typically represented as
strings, but are sometimes manipulated as integers. Object ids are strings, but are sometimes manipulated as integers. Object ids are
...@@ -31,7 +32,7 @@ The contant z64 has zero packed as a 64-bit string: ...@@ -31,7 +32,7 @@ The contant z64 has zero packed as a 64-bit string:
'\x00\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00\x00\x00\x00\x00'
Transaction id generation Transaction id generation
------------------------- =========================
Storages assign transaction ids as transactions are committed. These Storages assign transaction ids as transactions are committed. These
are based on UTC time, but must be strictly increasing. The are based on UTC time, but must be strictly increasing. The
...@@ -86,7 +87,7 @@ time, the time stamp we get will be based on the time: ...@@ -86,7 +87,7 @@ time, the time stamp we get will be based on the time:
Locking support Locking support
--------------- ===============
Storages are required to be thread safe. The locking descriptor helps Storages are required to be thread safe. The locking descriptor helps
automate that. It arranges for a lock to be acquired when a function automate that. It arranges for a lock to be acquired when a function
...@@ -147,7 +148,7 @@ attribute. ...@@ -147,7 +148,7 @@ attribute.
#as first argument (got C2 instance instead) #as first argument (got C2 instance instead)
Preconditions Preconditions
------------- =============
Often, we want to supply method preconditions. The locking descriptor Often, we want to supply method preconditions. The locking descriptor
supports optional method preconditions [1]_. supports optional method preconditions [1]_.
......
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