diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-03-17 12:32:33 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-03-17 12:32:33 -0400 |
| commit | b7e151ac5cf5a0c13b9a30bc6841ed0cfe322536 (patch) | |
| tree | 039e129fb13d3fbafd2dcc718c15a5a2ea85a49f /lib/sqlalchemy/dialects/sqlite/base.py | |
| parent | 2cadd768aa48d1180e24600cf133586a343ea10b (diff) | |
| download | sqlalchemy-b7e151ac5cf5a0c13b9a30bc6841ed0cfe322536.tar.gz | |
- The "auto close" for :class:`.ResultProxy` is now a "soft" close.
That is, after exhausing all rows using the fetch methods, the
DBAPI cursor is released as before and the object may be safely
discarded, but the fetch methods may continue to be called for which
they will return an end-of-result object (None for fetchone, empty list
for fetchmany and fetchall). Only if :meth:`.ResultProxy.close`
is called explicitly will these methods raise the "result is closed"
error.
fixes #3330 fixes #3329
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 0f32395e5..0254690b4 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -1305,7 +1305,7 @@ class SQLiteDialect(default.DefaultDialect): qtable = quote(table_name) statement = "%s%s(%s)" % (statement, pragma, qtable) cursor = connection.execute(statement) - if not cursor.closed: + if not cursor._soft_closed: # work around SQLite issue whereby cursor.description # is blank when PRAGMA returns no rows: # http://www.sqlite.org/cvstrac/tktview?tn=1884 |
