diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-03 11:55:12 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-03 11:55:12 -0400 |
| commit | ddf4210552fdff864a885b1ec6aa238105b16e8f (patch) | |
| tree | ae6e1c4231385954a8dd5252ffb715b5da6f5a4b /lib/sqlalchemy/dialects/sqlite | |
| parent | 5cd1d43bec73db77d26e6f663e2449e911520737 (diff) | |
| download | sqlalchemy-ddf4210552fdff864a885b1ec6aa238105b16e8f.tar.gz | |
- Calling fetchone() or similar on a result that
has already been exhausted, has been closed,
or is not a result-returning result now
raises ResourceClosedError, a subclass of
InvalidRequestError, in all cases, regardless
of backend. Previously, some DBAPIs would
raise ProgrammingError (i.e. pysqlite), others
would return None leading to downstream breakages
(i.e. MySQL-python).
- Connection, ResultProxy, as well as Session use
ResourceClosedError for all "this
connection/transaction/result is closed" types of
errors.
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite')
| -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 2d9e56baf..b84b18e68 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -600,5 +600,5 @@ def _pragma_cursor(cursor): """work around SQLite issue whereby cursor.description is blank when PRAGMA returns no rows.""" if cursor.closed: - cursor._fetchone_impl = lambda: None + cursor.fetchone = lambda: None return cursor |
