summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-06-23 18:47:28 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-06-23 18:47:28 +0000
commit7cfd3973ce7596091ec8abd1b314811716c8e93d (patch)
tree184f23731e7703656c9e8d982fd23401badcf533 /lib/sqlalchemy/sql.py
parent1af29a42d2007037f5ea790a005d05dded7d43c1 (diff)
downloadsqlalchemy-7cfd3973ce7596091ec8abd1b314811716c8e93d.tar.gz
- fixed "where"/"from" criterion of select() to accept a unicode string
in addition to regular string - both convert to text()
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index 92b51dd25..5ceb9bdea 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -2938,7 +2938,7 @@ class Select(_SelectBaseMixin, FromClause):
self._append_condition('having', having)
def _append_condition(self, attribute, condition):
- if type(condition) == str:
+ if isinstance(condition, basestring):
condition = _TextClause(condition)
self.__wherecorrelator.traverse(condition)
self._process_froms(condition, False)
@@ -2957,7 +2957,7 @@ class Select(_SelectBaseMixin, FromClause):
self.__correlated[from_obj] = from_obj
def append_from(self, fromclause):
- if type(fromclause) == str:
+ if isinstance(fromclause, basestring):
fromclause = FromClause(fromclause)
self.__correlator.traverse(fromclause)
self._process_froms(fromclause, True)