]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dev
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 4 Dec 2005 00:30:44 +0000 (00:30 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 4 Dec 2005 00:30:44 +0000 (00:30 +0000)
doc/build/content/adv_datamapping.myt
doc/build/content/dbengine.myt

index 31da6f77168830a7b4b6c8e1a3dedb6ae891296e..306da3f8180fe46e884684e5487ddacfb465f4f8 100644 (file)
     <&|doclib.myt:item, name="relationoptions", description="Relation Options" &>
     Keyword options to the <span class="codeline">relation</span> function include:
     <ul>
+        <li>lazy=(True|False|None) - specifies how the related items should be loaded.  a value of True indicates they should be loaded when the property is first accessed.  A value of False indicates they should be loaded by joining against the parent object query, so parent and child are loaded in one round trip.  A value of None indicates the related items are not loaded by the mapper in any case; the application will manually insert items into the list in some other way.  A relationship with lazy=None is still important; items added to the list or removed will cause the appropriate updates and deletes upon commit().</li>
         <li>primaryjoin - a ClauseElement that will be used as the primary join of this child object against the parent object, or in a many-to-many relationship the join of the primary object to the association table.  By default, this value is computed based on the foreign key relationships of the parent and child tables (or association table).</li>
         <li>secondaryjoin - a ClauseElement that will be used as the join of an association table to the child object.  By default, this value is computed based on the foreign key relationships of the association and child tables.</li>
         <li>foreignkey - specifies which column in this relationship is "foreign", i.e. which column refers to the parent object.  This value is automatically determined in all cases, based on the primary and secondary join conditions, except in the case of a self-referential mapper, where it is needed to indicate the child object's reference back to it's parent.</li>
index 2af9fb25b4a54c4fd2ab78e69efeaa2e120a2ed7..bec365166835ef864d63c1e2b19265ee3931de4f 100644 (file)
     </p>
     <&|doclib.myt:item, name="establishing", description="Establishing a Database Engine" &>
     <p>
-    Engines exist for SQLite, Postgres, and Oracle, using the Pysqlite, Psycopg (1 or 2), and cx_Oracle modules.  Each engine imports its corresponding module which is required to be installed.  For Postgres and Oracle, an alternate module may be specified at construction time as well.
+    Engines exist for SQLite, Postgres, MySQL, and Oracle, using the Pysqlite, Psycopg (1 or 2), MySQLDB, and cx_Oracle modules.  Each engine imports its corresponding module which is required to be installed.  For Postgres and Oracle, an alternate module may be specified at construction time as well.
     </p>
     <p>An example of connecting to each engine is as follows:</p>
     
     <&|formatting.myt:code&>
-    from sqlalchemy.engine import *
+    from sqlalchemy import *
 
     # sqlite in memory    
     sqlite_engine = create_engine('sqlite', {'filename':':memory:'}, **opts)