summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMatt Schuchhardt <matt.schuchhardt@gmail.com>2019-03-06 10:28:48 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-03-06 10:34:17 -0500
commit203de6946ef09b9fed2875491d2ac087a6dbfec6 (patch)
tree236f66bb0ce8f03c8320647d34c786fdd6cdb2d9 /examples
parentcb968b6dcd4dd8ce805827202ca55a7ce10fc871 (diff)
downloadsqlalchemy-203de6946ef09b9fed2875491d2ac087a6dbfec6.tar.gz
Fix large_resultsets performance example field name
Fixed bug in large_resultsets example case where a re-named "id" variable due to code reformatting caused the test to fail. Pull request courtesy Matt Schuchhardt. Fixes: #4528 Closes: #4529 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4529 Pull-request-sha: 8f52f10422114c397254db9e6f940d042708e0bd Change-Id: Iaca6fd06ec0ede8ff1745d627708ba492a2114c8
Diffstat (limited to 'examples')
-rw-r--r--examples/performance/large_resultsets.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/performance/large_resultsets.py b/examples/performance/large_resultsets.py
index 2945040b5..a5f99a283 100644
--- a/examples/performance/large_resultsets.py
+++ b/examples/performance/large_resultsets.py
@@ -170,7 +170,7 @@ def _test_dbapi_raw(n, make_objects):
# ORM land anyway :)
class SimpleCustomer(object):
def __init__(self, id_, name, description):
- self.id = id_
+ self.id_ = id_
self.name = name
self.description = description
@@ -184,7 +184,7 @@ def _test_dbapi_raw(n, make_objects):
for row in cursor.fetchall():
# ensure that we fully fetch!
customer = SimpleCustomer(
- id=row[0], name=row[1], description=row[2]
+ id_=row[0], name=row[1], description=row[2]
)
else:
for row in cursor.fetchall():