diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-10-15 18:41:02 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-10-15 18:41:02 +0000 |
| commit | c5571ab19a155f0c11381d65edc07c16902f3fad (patch) | |
| tree | 91d1177483fccf28f5527b1842f838c4623013fe /lib/sqlalchemy/schema.py | |
| parent | bc351a2dc423987f05f4bf88db4987be507ee0a1 (diff) | |
| download | sqlalchemy-c5571ab19a155f0c11381d65edc07c16902f3fad.tar.gz | |
- an executemany() now requires that all bound parameter
sets require that all keys are present which are
present in the first bound parameter set. The structure
and behavior of an insert/update statement is very much
determined by the first parameter set, including which
defaults are going to fire off, and a minimum of
guesswork is performed with all the rest so that performance
is not impacted. For this reason defaults would otherwise
silently "fail" for missing parameters, so this is now guarded
against. [ticket:1566]
Diffstat (limited to 'lib/sqlalchemy/schema.py')
| -rw-r--r-- | lib/sqlalchemy/schema.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index 7965070d1..9798fc23a 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -1094,6 +1094,10 @@ class ColumnDefault(DefaultGenerator): @util.memoized_property def is_clause_element(self): return isinstance(self.arg, expression.ClauseElement) + + @util.memoized_property + def is_scalar(self): + return not self.is_callable and not self.is_clause_element and not self.is_sequence def _maybe_wrap_callable(self, fn): """Backward compat: Wrap callables that don't accept a context.""" |
