]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix up a docstring and some examples
authorAnts Aasma <ants.aasma@gmail.com>
Thu, 26 Jul 2007 00:01:28 +0000 (00:01 +0000)
committerAnts Aasma <ants.aasma@gmail.com>
Thu, 26 Jul 2007 00:01:28 +0000 (00:01 +0000)
examples/adjacencytree/basic_tree.py
examples/collections/large_collection.py
examples/pickle/custom_pickler.py
examples/poly_assoc/poly_assoc.py
examples/poly_assoc/poly_assoc_fk.py
examples/poly_assoc/poly_assoc_generic.py
examples/polymorph/polymorph.py
examples/polymorph/single.py
examples/vertical/vertical.py
lib/sqlalchemy/databases/informix.py
lib/sqlalchemy/schema.py

index 9f937315b8211e8f839eb29f2f405214a337fd56..53bdc829839d6285c1c3f1db6dce6c10ffc52b6e 100644 (file)
@@ -5,7 +5,8 @@ from sqlalchemy.orm import *
 from sqlalchemy.util import OrderedDict
 from sqlalchemy.orm.collections import attribute_mapped_collection
 
-metadata = MetaData('sqlite:///', echo=True)
+metadata = MetaData('sqlite:///')
+metadata.bind.echo = True
 
 trees = Table('treenodes', metadata,
     Column('node_id', Integer, Sequence('treenode_id_seq',optional=False), primary_key=True),
index d592441ab9c6e9293eeb67fbba48a3819518a967..3c53db121ce65307cdc009ac321005281698eed2 100644 (file)
@@ -1,7 +1,8 @@
 """illlustrates techniques for dealing with very large collections"""
 
 from sqlalchemy import *
-meta = MetaData('sqlite://', echo=True)
+meta = MetaData('sqlite://')
+meta.bind.echo = True
 
 org_table = Table('organizations', meta, 
     Column('org_id', Integer, primary_key=True),
index 755e04238c4c59c896a972ac194160f61d5ab476..b45e16e7c659c6a001629357604621ffbfd74fc7 100644 (file)
@@ -6,7 +6,8 @@ from cStringIO import StringIO
 from pickle import Pickler, Unpickler
 import threading
 
-meta = MetaData('sqlite://', echo=True)
+meta = MetaData('sqlite://')
+meta.bind.echo = True
 
 class MyExt(MapperExtension):
     def populate_instance(self, mapper, selectcontext, row, instance, identitykey, isnew):
index d321e412e60d2a77d811a9c2eb264d9d6f386816..c13ffbfa196f12a7245676f8904737a85baa4d56 100644 (file)
@@ -23,7 +23,7 @@ the associated target object from those which associate with it.
 from sqlalchemy import *
 from sqlalchemy.orm import *
 
-metadata = MetaData('sqlite://', echo=False)
+metadata = MetaData('sqlite://')
 
 #######
 # addresses table, class, 'addressable interface'.
index d0aab4fd240478fb06d512acfa7f21a0277f86fe..22ee50009a95997922b230bcbd5e36078d91c196 100644 (file)
@@ -22,7 +22,7 @@ poly_assoc_generic.py.
 from sqlalchemy import *
 from sqlalchemy.orm import *
 
-metadata = MetaData('sqlite://', echo=False)
+metadata = MetaData('sqlite://')
 
 #######
 # addresses table, class, 'addressable interface'.
index 82daa4182a97690ddb6dacac1c0a9cf94349131a..4fca310193b2f1a1195a0f46a25a58973a27b122 100644 (file)
@@ -9,7 +9,7 @@ function "association" which creates a new polymorphic association
 from sqlalchemy import *
 from sqlalchemy.orm import *
 
-metadata = MetaData('sqlite://', echo=False)
+metadata = MetaData('sqlite://')
 
 def association(cls, table):
     """create an association 'interface'."""
index 498bfa775c15b70a0421bdaf8cade4e592e5b751..4f3aeb7d2634a044e535bbbf32d987a20ddc14ca 100644 (file)
@@ -4,7 +4,8 @@ import sets
 
 # this example illustrates a polymorphic load of two classes
 
-metadata = MetaData('sqlite://', echo=True)
+metadata = MetaData('sqlite://')
+metadata.bind.echo = True
 
 # a table to store companies
 companies = Table('companies', metadata, 
index 61809a05c15d6f71578c0c044ef0d287069a5c50..dfc4264169f0563c9eb1cf68d18336554f8d672b 100644 (file)
@@ -1,7 +1,8 @@
 from sqlalchemy import *
 from sqlalchemy.orm import *
 
-metadata = MetaData('sqlite://', echo='debug')
+metadata = MetaData('sqlite://')
+metadata.bind.echo = 'debug'
 
 # a table to store companies
 companies = Table('companies', metadata, 
index 75e56935c80a557001438507ef66248004b6855b..e3b48c3369ceaea3b004ad9705de1c4081599112 100644 (file)
@@ -7,7 +7,8 @@ from sqlalchemy.orm import *
 from sqlalchemy.orm.collections import mapped_collection
 import datetime
 
-e = MetaData('sqlite://', echo=True)
+e = MetaData('sqlite://')
+e.bind.echo = True
 
 # this table represents Entity objects.  each Entity gets a row in this table,
 # with a primary key and a title.
index 43de41b7869a988b9e9b2f0d61d49e1ea0229c15..5aad21b433799eb4c8b8e9d240f119a314a57cb7 100644 (file)
@@ -119,7 +119,7 @@ class InfoBoolean(sqltypes.Boolean):
         elif value is None:
             return None
         else:
-            return value and True or False     
+            return value and True or False
 
         
 colspecs = {
index 28a503cc0312262695e0553d80ef5c2a653c6556..08c1f6bab0273519b57ee64e7aa79010f3646f87 100644 (file)
@@ -1079,8 +1079,8 @@ class MetaData(SchemaItem):
             
             bind
                 an Engine, or a string or URL instance which will be passed
-                to create_engine(), along with \**kwargs - this MetaData will
-                be bound to the resulting engine.
+                to create_engine(), this MetaData will be bound to the resulting
+                engine.
 
             case_sensitive
                 popped from \**kwargs, indicates default case sensitive setting for