From 66f2e1257a98bdb257e15a0d9b9588289ef40631 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 1 Apr 2014 18:29:54 -0400 Subject: - back off the callcounts a bit for the boolean fix - rewrite callcounts for select() --- lib/sqlalchemy/sql/selectable.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 2ce164445..cfa229f94 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -14,7 +14,8 @@ from .elements import ClauseElement, TextClause, ClauseList, \ from .elements import _clone, \ _literal_as_text, _interpret_as_column_or_from, _expand_cloned,\ _select_iterables, _anonymous_label, _clause_element_as_expr,\ - _cloned_intersection, _cloned_difference, True_, _only_column_elements + _cloned_intersection, _cloned_difference, True_, _only_column_elements,\ + TRUE from .base import Immutable, Executable, _generative, \ ColumnCollection, ColumnSet, _from_objects, Generative from . import type_api @@ -2191,12 +2192,12 @@ class Select(HasPrefixes, GenerativeSelect): self._raw_columns = [] if whereclause is not None: - self._whereclause = and_(True_._singleton(), whereclause) + self._whereclause = _literal_as_text(whereclause).self_group(against=operators._asbool) else: self._whereclause = None if having is not None: - self._having = and_(True_._singleton(), having) + self._having = _literal_as_text(having).self_group(against=operators._asbool) else: self._having = None -- cgit v1.2.1