[z3-checkins] r25876 - in z3/sqlos/trunk: . src/sqlos
jinty at codespeak.net
jinty at codespeak.net
Mon Apr 17 01:46:27 CEST 2006
Author: jinty
Date: Mon Apr 17 01:46:21 2006
New Revision: 25876
Modified:
z3/sqlos/trunk/TODO.txt
z3/sqlos/trunk/src/sqlos/README.txt
z3/sqlos/trunk/src/sqlos/_transaction.py
z3/sqlos/trunk/src/sqlos/adapter.py
z3/sqlos/trunk/src/sqlos/connection.py
Log:
Add some documntation
Modified: z3/sqlos/trunk/TODO.txt
==============================================================================
--- z3/sqlos/trunk/TODO.txt (original)
+++ z3/sqlos/trunk/TODO.txt Mon Apr 17 01:46:21 2006
@@ -4,9 +4,6 @@
Features
--------
-* Continuing quest to make sqlos containers more like zope persistent
- containers.
-
* Make it un-necessary to register the db adapter class in zcml. This is
required right now as there is no 'correct' way to tell which database a
IZopeConnection is for.
@@ -15,6 +12,3 @@
Bugs
----
-
-* the sqlos.auth, sqlos.annotations and sqlos.attributeannotations modules
- are completely un-tested and wait for someone to love them.
Modified: z3/sqlos/trunk/src/sqlos/README.txt
==============================================================================
--- z3/sqlos/trunk/src/sqlos/README.txt (original)
+++ z3/sqlos/trunk/src/sqlos/README.txt Mon Apr 17 01:46:21 2006
@@ -59,9 +59,9 @@
Dependencies
------------
- + setuptools >= 0.6a11
+ + setuptools_ >= 0.6a11
- + SQLObject >= 0.7
+ + SQLObject_ >= 0.7
Place the sqlobject package somewhere in python's sys.path
($ZOPEHOME/lib/python is a good location).
@@ -74,6 +74,7 @@
repository.
.. _zopeproducts: http://cvs.zope.org/zopeproducts/
+.. _setuptools: http://www.python.org/pypi/setuptools
Background
Modified: z3/sqlos/trunk/src/sqlos/_transaction.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/_transaction.py (original)
+++ z3/sqlos/trunk/src/sqlos/_transaction.py Mon Apr 17 01:46:21 2006
@@ -7,7 +7,21 @@
# License (ZPL) v2.1. See COPYING.txt for more information.
#
##############################################################################
-"""
+"""Transaction management.
+
+This module integrates Zope and SQLObject's transaction management. It does 3
+things:
+
+ * Creates a thread local cache of SQLObjects so that cached objects do not
+ leak into other threads as they would in pure SQLObject.
+ * Clears the thread local cache at the start of each new transaction.
+ * When an object is modified, it registers itself with the data manager
+ which, in turn, registers a pre-commit hook. This hook sync's the object
+ sending all the SQL down the line before the two phase commit starts.
+
+XXX - There was a reason why we couldn't do this without a data manager, but I
+ cannot remember it now. -jinty
+
$Id$
"""
Modified: z3/sqlos/trunk/src/sqlos/adapter.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/adapter.py (original)
+++ z3/sqlos/trunk/src/sqlos/adapter.py Mon Apr 17 01:46:21 2006
@@ -7,14 +7,18 @@
# License (ZPL) v2.1. See COPYING.txt for more information.
#
##############################################################################
-"""
+"""Connection adapters for sqlos.
+
+These adapters adapt Zope RDB Connections to SQLObject connections by
+sub-classing the SQLObject connection classes.
+
$Id$
"""
__metaclass__ = type
from sqlobject.dbconnection import DBAPI
-from sqlobject import _mysql, _postgres, _sybase, _sqlite
+from sqlobject import _mysql, _postgres, _sqlite
from sqlobject.converters import registerConverter
from sqlobject.mysql import mysqlconnection
from zope.app.rdb.interfaces import DatabaseException
Modified: z3/sqlos/trunk/src/sqlos/connection.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/connection.py (original)
+++ z3/sqlos/trunk/src/sqlos/connection.py Mon Apr 17 01:46:21 2006
@@ -8,6 +8,15 @@
#
##############################################################################
"""
+Connection management.
+
+This module defines the connection descriptor used as the connection in a
+a sqlos SQLObject. This is responsible for getting the Zope connection and
+adapting it to look like a SQLObject connection.
+
+Connections are cached as experience has shown that all the utility and
+adapter utilities have a significant effect on speed.
+
$Id: factory.py 5216 2004-06-21 18:33:07Z dreamcatcher $
"""
__metaclass__ = type
More information about the z3-checkins
mailing list