[Checkins] SVN: Products.SQLAlchemyDA/trunk/README.txt added some
more preliminary text
Andreas Jung
andreas at andreas-jung.com
Mon Apr 30 13:08:16 EDT 2007
Log message for revision 74936:
added some more preliminary text
Changed:
U Products.SQLAlchemyDA/trunk/README.txt
-=-
Modified: Products.SQLAlchemyDA/trunk/README.txt
===================================================================
--- Products.SQLAlchemyDA/trunk/README.txt 2007-04-30 17:03:13 UTC (rev 74935)
+++ Products.SQLAlchemyDA/trunk/README.txt 2007-04-30 17:08:16 UTC (rev 74936)
@@ -8,6 +8,8 @@
A shim providing access to registered z3c.sqlalchemy wrapper instances.
+The DA also might act as a generic DA for all databases supported through
+SQLAlchemy
Requirements:
-------------
@@ -19,7 +21,28 @@
- z3c.sqlalchemy 0.1.10 +
+Installation:
+-------------
+A z3c.sqlAlchemy SAWrapper must be registered. The best way to do this right
+now to put something like this into your Product's initialize():
+
+Products/YourProduct/__init__.py:
+
+ def initialize(context):
+
+ from z3c.sqlalchemy import createSAWrapper, registerSAWrapper
+ wrapper = createSAWrapper('postgres://user:password@host/database', forZope=True)
+ registerSAWrapper(wrapper, 'my-sa-wrapper')
+
+After restarting Zope you go to the ZMI and create an instance of "SQLAlchemy
+Wrapper Integration" (as you would create some DA instance). After creating the
+instance you should see 'my-sa-wrapper' in the properties form of the new
+instance. When creating a new ZSQL method you should be able to use this DA
+instance as connection id.
+
+
+
Exported methods are: getMapper() and getSession().
More information about the Checkins
mailing list