diff options
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 11 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 45e4c036f..259909d47 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -320,6 +320,10 @@ class ExecutionContext(object): returns_rows True if the statement should return result rows + + postfetch_cols + a list of Column objects for which a server-side default + or inline SQL expression value was fired off. applies to inserts and updates. The Dialect should provide an ExecutionContext via the create_execution_context() method. The `pre_exec` and `post_exec` @@ -414,11 +418,6 @@ class ExecutionContext(object): raise NotImplementedError() - def postfetch_cols(self): - """return a list of Column objects for which a 'passive' server-side default - value was fired off. applies to inserts and updates.""" - - raise NotImplementedError() class Compiled(object): """Represent a compiled SQL expression. @@ -1481,7 +1480,7 @@ class ResultProxy(object): See ExecutionContext for details. """ - return self.context.postfetch_cols() + return self.context.postfetch_cols def supports_sane_rowcount(self): """Return ``supports_sane_rowcount`` from the dialect. diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 0e50093ee..38ea903e4 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -308,11 +308,8 @@ class DefaultExecutionContext(base.ExecutionContext): return self._last_updated_params def lastrow_has_defaults(self): - return hasattr(self, '_postfetch_cols') and len(self._postfetch_cols) + return hasattr(self, 'postfetch_cols') and len(self.postfetch_cols) - def postfetch_cols(self): - return self._postfetch_cols - def set_input_sizes(self): """Given a cursor and ClauseParameters, call the appropriate style of ``setinputsizes()`` on the cursor, using DB-API types @@ -383,4 +380,4 @@ class DefaultExecutionContext(base.ExecutionContext): else: self._last_updated_params = compiled_parameters - self._postfetch_cols = self.compiled.postfetch + self.postfetch_cols = self.compiled.postfetch |
