Michael Bayer <[email protected]> writes:

> if the issue is that you have a query(), and you like to say
> somequery.filter(q == "x"), you'd turn query() into a "subquery"
> (i.e. an alisaed SQLAlchemy expression object) using q.subquery(),
> and then into a "scalar" subquery using as_scalar(), which means the
> select() construct now behaves like a column.  as_scalar() is also
> available directly on a select() construct.

That's it - thanks!  I see some attempts in my log to try to use
as_scalar(), but only directly on the query object which doesn't
support that method.  I didn't think to put it together with
subquery() first, though in hindsight that makes perfect sense.

Thanks again.

-- David

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to