summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index a7f5d396a..d184816ab 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -1037,12 +1037,12 @@ def _no_literals(element):
else:
return element
-def _only_column_elements(element):
+def _only_column_elements(element, name):
if hasattr(element, '__clause_element__'):
element = element.__clause_element__()
if not isinstance(element, ColumnElement):
- raise exc.ArgumentError("Column-based expression object expected; "
- "got: %r" % element)
+ raise exc.ArgumentError("Column-based expression object expected for argument '%s'; "
+ "got: '%s', type %s" % (name, element, type(element)))
return element
def _corresponding_column_or_error(fromclause, column,
@@ -4045,15 +4045,15 @@ class Select(_SelectBaseMixin, FromClause):
"""return a new select() construct which will correlate the given FROM
clauses to that of an enclosing select(), if a match is found.
- By "match", the given fromclause must be present in this select's
+ By "match", the given fromclause must be present in this select's
list of FROM objects and also present in an enclosing select's list of
FROM objects.
- Calling this method turns off the select's default behavior of
+ Calling this method turns off the select's default behavior of
"auto-correlation". Normally, select() auto-correlates all of its FROM
clauses to those of an embedded select when compiled.
- If the fromclause is None, correlation is disabled for the returned
+ If the fromclause is None, correlation is disabled for the returned
select().
"""