[Checkins] SVN: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/README.txt updated

Andreas Jung andreas at andreas-jung.com
Mon Apr 30 01:35:24 EDT 2007


Log message for revision 74904:
  updated
  

Changed:
  U   z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/README.txt

-=-
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/README.txt
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/README.txt	2007-04-30 05:34:32 UTC (rev 74903)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/README.txt	2007-04-30 05:35:23 UTC (rev 74904)
@@ -51,8 +51,8 @@
 
 Basic usage from within a pure Python application:
 
-   > from z3c.sqlalchemy import createSQLAlchemyWrapper
-   > wrapper = createSQLAlchemyWrapper('postgres://postgres:postgres@host/someDB')
+   > from z3c.sqlalchemy import createSAWrapper
+   > wrapper = createSAWrapper('postgres://postgres:postgres@host/someDB')
    > session = wrapper.session
    > FormatMapper = wrapper.getMapper('format') # auto-generated mapper for table 'format'
    > for row in session.query(FormatMapper).select(...): print row
@@ -62,8 +62,8 @@
 participates in Zope transactions. For this purpose you must use the additional
 parameter 'forZope':
 
-   > from z3c.sqlalchemy import createSQLAlchemyWrapper
-   > wrapper = createSQLAlchemyWrapper('postgres://postgres:postgres@host/someDB', forZope=True)
+   > from z3c.sqlalchemy import createSAWrapper
+   > wrapper = createSAWrapper('postgres://postgres:postgres@host/someDB', forZope=True)
    > session = wrapper.session
 
 In this case the session will participate automatically in a Zope transaction.
@@ -89,10 +89,10 @@
 
 Example:
 
-   > from z3c.sqlalchemy import createSQLAlchemyWrapper, Model
+   > from z3c.sqlalchemy import createSAWrapper, Model
    > model = Model()
    > model.add(name='A', relations=('B',))
-   > wrapper = createSQLAlchemyWrapper('postgres://postgres:postgres@host/someDB', model=model)
+   > wrapper = createSAWrapper('postgres://postgres:postgres@host/someDB', model=model)
    > AMapper= wrapper.getMapper('A') 
 
 This will generate a mapper AMapper where all instances of AMapper have a
@@ -106,10 +106,10 @@
 way. Therefore this feature of z3c.sqlalchemy is highly experimental and currently
 only available for Postgres (tested with Postgres 8.X).
 
-   > from z3c.sqlalchemy import createSQLAlchemyWrapper, Model
+   > from z3c.sqlalchemy import createSAWrapper, Model
    > model = Model()
    > model.add(name='A', autodetect_relations=True)
-   > wrapper = createSQLAlchemyWrapper('postgres://postgres:postgres@host/someDB', model=model)
+   > wrapper = createSAWrapper('postgres://postgres:postgres@host/someDB', model=model)
    > AMapper= wrapper.getMapper('A') 
 
 In this case z3c.sqlalchemy will scan all tables in order to detect
@@ -122,11 +122,11 @@
 generated mapper.  Also this usecase is supported by passing the base class to
 the model using the 'mapper_class' parameter:
 
-   > from z3c.sqlalchemy import createSQLAlchemyWrapper, Model
+   > from z3c.sqlalchemy import createSAWrapper, Model
    > class MyAMapper(object): pass
    > model = Model()
    > model.add(name='A', relations=('B',) mapper_class = MyAMapper)
-   > wrapper = createSQLAlchemyWrapper('postgres://postgres:postgres@host/someDB', model=model)
+   > wrapper = createSAWrapper('postgres://postgres:postgres@host/someDB', model=model)
    > AMapper= wrapper.getMapper('A')  # AMapper will be an instance of MyAMapper
 
 



More information about the Checkins mailing list