]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Tweak docs, very minor DMD compatability tweak
authorJason Kirtland <jek@discorporate.us>
Fri, 6 Jul 2007 17:28:45 +0000 (17:28 +0000)
committerJason Kirtland <jek@discorporate.us>
Fri, 6 Jul 2007 17:28:45 +0000 (17:28 +0000)
doc/build/content/metadata.txt
lib/sqlalchemy/schema.py

index 3f13a3c6989182ac3c9c97dafb800279e282fdce..1090b0851cc155845e998606cfcc122b409e3962 100644 (file)
@@ -132,12 +132,16 @@ To bind `MetaData` to a single `Engine`, supply an Engine when creating the Meta
     # create the Engine and MetaData in one step
     meta = MetaData('postgres://db/', **kwargs)
 
-    # or bind later
+    # or bind the MetaData to an Engine later
     meta = MetaData()
-    # ...
+    invoices = Table('invoices', meta, 
+        Column('invoice_id', Integer, primary_key=True),
+        Column('ref_num', Integer, primary_key=True),
+        Column('description', String(60), nullable=False)
+    )
     meta.connect(engine)
 
-Another form of `MetaData` exits which can connect to an engine within the current thread (or "on a per-thread basis"), allowing other threads to be connected to different engines simultaneously:
+Another form of `MetaData` exists which can connect to an engine within the current thread (or "on a per-thread basis"), allowing other threads to be connected to different engines simultaneously:
 
     {python}
     meta = ThreadLocalMetaData()
index 868dcb7b0ced691dd9dd54fd1463ab8fbdf76ce8..d01677b6974b977acd1eda5d83f48782d7afdc5d 100644 (file)
@@ -1268,7 +1268,7 @@ def DynamicMetaData(name=None, threadlocal=True, **kw):
     """Deprecated.  Use ``MetaData`` or ``ThreadLocalMetaData``.""" 
 
     if threadlocal: 
-        return ThreadLocalMetaData(**kw) 
+        return ThreadLocalMetaData(name=name, **kw) 
     else: 
         return MetaData(name=name, **kw)