From 203de6946ef09b9fed2875491d2ac087a6dbfec6 Mon Sep 17 00:00:00 2001 From: Matt Schuchhardt Date: Wed, 6 Mar 2019 10:28:48 -0500 Subject: 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 --- examples/performance/large_resultsets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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(): -- cgit v1.2.1