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
========
......
.. include:: ../src/ZODB/ConflictResolution.rst
.. include:: ../CHANGES.rst
.. include:: ../HISTORY.rst
......@@ -2,6 +2,10 @@
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.
Simple fetch, modify, commit
......
.. include:: ../src/ZODB/cross-database-references.rst
.. include:: ../DEVELOPERS.rst
=============
Event support
=============
Sometimes, you want to react when ZODB does certain things. In the
past, ZODB provided ad hoc hook functions for this. Going forward,
......
.. include:: ../src/ZODB/historical_connections.rst
......@@ -30,8 +30,18 @@ Learning more
introduction
tutorial
guide/index
reference/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/>`_
......
.. include:: ../src/ZODB/persistentclass.rst
......@@ -2,6 +2,10 @@
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
are nested to *one* level. There are top-level transactions and
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:
>>> tm.abort()
Databases for new objects
-------------------------
=========================
Objects are normally added to a database by making them reachable from
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
the ambiguity.
Dissallowing implicit cross-database references
-----------------------------------------------
===============================================
The database contructor accepts a xrefs keyword argument that defaults
to True. If False is passed, the implicit cross database references
......@@ -173,7 +173,7 @@ the other way around.
>>> transaction.abort()
NOTE
----
====
This implementation is incomplete. It allows creating and using
cross-database references, however, there are a number of facilities
......
......@@ -177,7 +177,7 @@ until we sync:
'red'
Instances of Persistent Classes
-------------------------------
===============================
We can, of course, store instances of persistent classes in the
database:
......@@ -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 are handled differently
than normal instances. When we copy a persistent instances of a
......@@ -267,7 +267,7 @@ Now, we can read the object:
'blue'
Copying
-------
=======
If we copy an instance via export/import, the copy and the original
share the same class:
......
......@@ -156,6 +156,6 @@ class ExampleClass(object):
def test_suite():
suite = unittest.defaultTestLoader.loadTestsFromName(__name__)
suite.addTest(
doctest.DocFileSuite('../utils.txt', checker=checker)
doctest.DocFileSuite('../utils.rst', checker=checker)
)
return suite
......@@ -394,7 +394,7 @@ def test_suite():
manuel.doctest.Manuel(checker=ZODB.tests.util.checker)
+ manuel.footnote.Manuel()
+ manuel.capture.Manuel(),
'../ConflictResolution.txt',
'../ConflictResolution.rst',
setUp=setUp, tearDown=tearDown
),
doctest.DocTestSuite(
......
......@@ -183,13 +183,13 @@ def tearDownDbs(test):
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite(
'../cross-database-references.txt',
'../cross-database-references.rst',
globs=dict(MyClass=MyClass),
tearDown=tearDownDbs,
checker=ZODB.tests.util.checker,
),
doctest.DocFileSuite(
'../cross-database-references.txt',
'../cross-database-references.rst',
globs=dict(MyClass=MyClass_w_getnewargs),
tearDown=tearDownDbs,
checker=ZODB.tests.util.checker,
......
......@@ -20,6 +20,6 @@ def test_suite():
return manuel.testing.TestSuite(
manuel.doctest.Manuel(checker=ZODB.tests.util.checker) +
manuel.footnote.Manuel(),
'../historical_connections.txt',
'../historical_connections.rst',
setUp=ZODB.tests.util.setUp, tearDown=ZODB.tests.util.tearDown,
)
......@@ -87,7 +87,7 @@ def tearDown(test):
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite(
"../persistentclass.txt",
"../persistentclass.rst",
setUp=setUp, tearDown=tearDown,
checker=ZODB.tests.util.checker),
doctest.DocTestSuite(setUp=setUp, tearDown=tearDown),
......
ZODB Utilits Module
===================
=====================
ZODB Utilities Module
=====================
The ZODB.utils module provides a number of helpful, somewhat random
:), utility functions.
......@@ -10,7 +11,7 @@ This document documents a few of them. Over time, it may document
more.
64-bit integers and strings
---------------------------------
===========================
ZODB uses 64-bit transaction ids that are typically represented as
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:
'\x00\x00\x00\x00\x00\x00\x00\x00'
Transaction id generation
-------------------------
=========================
Storages assign transaction ids as transactions are committed. These
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:
Locking support
---------------
===============
Storages are required to be thread safe. The locking descriptor helps
automate that. It arranges for a lock to be acquired when a function
......@@ -147,7 +148,7 @@ attribute.
#as first argument (got C2 instance instead)
Preconditions
-------------
=============
Often, we want to supply method preconditions. The locking descriptor
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