On Jan 25, 3:08 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> jpeck wrote:
> >> Depending on your database, you may have a function-style row
> >> constructor that does what you want. For example, PostgreSQL treats (a,
> >> b) and ROW(a, b) as equivalent. If this works for you, then I think you
> >> can then use SQLAlchemy's func object:
>
> >> select([...]).where(func.row(a, b).in_([func.row(a1, b1), func.row(a2,
> >> b2)]))
>
> >> I have used func.row to build row objects, but I haven't used it with
> >> the in_ operator, so YMMV.
>
> > Conor - that was exactly what I was looking for! Much nicer than
> > generating via text().
>
> > Sorry for top posting before! (I lose the internets today).
>
> I just added `tuple_()` into trunk since its about time we had this.
>
> http://www.sqlalchemy.org/docs/06/reference/sqlalchemy/expressions.ht...

Michael - you are the man! I'm going to try this out first thing in
the morning. I've been following this list for the past couple of
years, and you always seem to come through for people. This may sound
funny, but what makes or breaks a software component for me is the
quality of people working on the project. People like Tom Lane are why
I choose Postgresql, and you are the reason I choose SQLAlchemy.
Thanks for all of your hard work!

Jeff Peck

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

Reply via email to