summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-01-22 19:21:51 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-01-22 19:21:51 -0500
commitb4da470d921931d2384fd0bfe72a9ac5c9b9def9 (patch)
treec3926d44f55bdf21a4f41fe035648aef4254ea3e /examples
parent21870c750302704890f5fc7a4e15c7e27c3e512f (diff)
downloadsqlalchemy-b4da470d921931d2384fd0bfe72a9ac5c9b9def9.tar.gz
- [bug] Fixed large_collection.py to close the
session before dropping tables. [ticket:2346]
Diffstat (limited to 'examples')
-rw-r--r--examples/large_collection/large_collection.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/large_collection/large_collection.py b/examples/large_collection/large_collection.py
index a251861d6..20c3b5218 100644
--- a/examples/large_collection/large_collection.py
+++ b/examples/large_collection/large_collection.py
@@ -47,7 +47,7 @@ mapper(Organization, org_table, properties = {
mapper(Member, member_table)
if __name__ == '__main__':
- engine = create_engine("mysql://scott:tiger@localhost/test", echo=True)
+ engine = create_engine("postgresql://scott:tiger@localhost/test", echo=True)
meta.create_all(engine)
# expire_on_commit=False means the session contents
@@ -89,6 +89,7 @@ if __name__ == '__main__':
print "-------------------------\nno Member rows should remain:\n"
print sess.query(Member).count()
+ sess.close()
print "------------------------\ndone. dropping tables."
meta.drop_all(engine) \ No newline at end of file