On Jan 8, 11:13 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008, at 5:40 PM, Eoghan Murray wrote:
>
>
>
> > On Jan 8, 7:28 pm, Jonathan Gardner <[EMAIL PROTECTED]>
> > wrote:
> >> Eoghan Murray wrote:
> >>> Ideally this would be expressed as:
>
> >>>>>> MyTable.filter(MyTable.c.MyColumn.in(ls))
>
> >> Try: MyTable.filter(MyTable.c.MyColumn.in_(ls))
>
> >> Just a guess. No time to see if this is right.
>
> > That produces the following strange SQL where clause:
> > WHERE MyTable.MyColumn = ARRAY['foo', 'bar', 'baz']
>
> version 0.4 ?  if on version 0.3 use in_(*list)

Thanks, the list unpacking works like a treat -
Also, after upgrading from 0.4.0beta6 to 0.4.2 there is no need for
the unpacking - excellent!
This would be a great example to give in
http://www.sqlalchemy.org/docs/04/sqlexpression.html#sql_operators
because it's cool and that trailing underscore might prevent people
(me) from discovering it.

Eoghan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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