:tags: orm
:tickets: 2122
- Some fixes to "evaulate" and "fetch" evaluation
+ Some fixes to "evaluate" and "fetch" evaluation
when query.update(), query.delete() are called.
The retrieval of records is done after autoflush
in all cases, and before update/delete is
expr1 = mycolumn > 2
bool(expr1 == expr1)
- Would evaulate as ``False``, even though this is an identity
+ Would evaluate as ``False``, even though this is an identity
comparison, because ``mycolumn > 2`` would be "grouped" before
being placed into the :class:`.BinaryExpression`, thus changing
its identity. :class:`.BinaryExpression` now keeps track
:tags: bug, orm
:tickets: 3117
- The "evaulator" for query.update()/delete() won't work with multi-table
+ The "evaluator" for query.update()/delete() won't work with multi-table
updates, and needs to be set to `synchronize_session=False` or
`synchronize_session='fetch'`; a warning is now emitted. In
1.0 this will be promoted to a full exception.
in an ``ORDER BY`` clause, if that label is also referred to
in the columns clause of the select, instead of rewriting the
full expression. This gives the database a better chance to
- optimize the evaulation of the same expression in two different
+ optimize the evaluation of the same expression in two different
contexts.
.. seealso::
:tags: bug, orm
:tickets: 3117
- The "evaulator" for query.update()/delete() won't work with multi-table
+ The "evaluator" for query.update()/delete() won't work with multi-table
updates, and needs to be set to `synchronize_session=False` or
`synchronize_session='fetch'`; this now raises an exception, with a
message to change the synchronize setting.
query.update() with ``synchronize_session='evaluate'`` raises on multi-table update
-----------------------------------------------------------------------------------
-The "evaulator" for :meth:`.Query.update` won't work with multi-table
+The "evaluator" for :meth:`.Query.update` won't work with multi-table
updates, and needs to be set to ``synchronize_session=False`` or
``synchronize_session='fetch'`` when multiple tables are present.
The new behavior is that an explicit exception is now raised, with a message
elif bind.callable:
# some ORM functions (lazy loading)
# place the bind's value as a
- # callable for deferred evaulation.
+ # callable for deferred evaluation.
value = bind.callable()
else:
# just use .value
def cast(self, type_):
"""Convert this :class:`.JSONElement` to apply both the 'astext' operator
- as well as an explicit type cast when evaulated.
+ as well as an explicit type cast when evaluated.
E.g.::
elif not isinstance(value, (Column, MapperProperty)):
# using @declared_attr for some object that
# isn't Column/MapperProperty; remove from the dict_
- # and place the evaulated value onto the class.
+ # and place the evaluated value onto the class.
if not k.startswith('__'):
dict_.pop(k)
setattr(cls, k, value)
SELECT statement emitted and will significantly reduce
performance.
- * The ``'evaulate'`` strategy performs a scan of
+ * The ``'evaluate'`` strategy performs a scan of
all matching objects within the :class:`.Session`; if the
contents of the :class:`.Session` are expired, such as
via a proceeding :meth:`.Session.commit` call, **this will
SELECT statement emitted and will significantly reduce
performance.
- * The ``'evaulate'`` strategy performs a scan of
+ * The ``'evaluate'`` strategy performs a scan of
all matching objects within the :class:`.Session`; if the
contents of the :class:`.Session` are expired, such as
via a proceeding :meth:`.Session.commit` call, **this will
:func:`.mapper`.
:param cols: optional list of column key names or :class:`.Column`
- objects. If omitted, all column expressions evaulated on the server
+ objects. If omitted, all column expressions evaluated on the server
are added to the returning list.
.. versionadded:: 0.9.0
result of the ``CASE`` construct if all expressions within
:paramref:`.case.whens` evaluate to false. When omitted, most
databases will produce a result of NULL if none of the "when"
- expressions evaulate to true.
+ expressions evaluate to true.
"""
.. versionadded:: 0.8 - added the 'precedence' argument.
:param is_comparison: if True, the operator will be considered as a
- "comparison" operator, that is which evaulates to a boolean
+ "comparison" operator, that is which evaluates to a boolean
true/false value, like ``==``, ``>``, etc. This flag should be set
so that ORM relationships can establish that the operator is a
comparison operator when used in a custom join condition.
def bool_or_str(*text):
- """Return a callable that will evaulate a string as
+ """Return a callable that will evaluate a string as
boolean, or one of a set of "alternate" string values.
"""