[sqlalchemy] Re: how to query across all fields in an object?

2008-10-15 Thread Wojciech Malinowski
Jorge Vargas wrote: Hi, I'm trying to implement a simple search field in my application and I was wondering which will be the best way to implement it on SQLAlchemy. I have googled around and found several partial solutions but none of them convince me of being the right way. My use

[sqlalchemy] Re: how to query across all fields in an object?

2008-10-15 Thread az
On Wednesday 15 October 2008 07:04:29 Jorge Vargas wrote: On Tue, Oct 14, 2008 at 11:59 AM, [EMAIL PROTECTED] wrote: this is somewhat frequent question, lookup the group in the past if anyone has something usable. maybe something like query(cls).filter( or_(*[column == value

[sqlalchemy] Re: how to query across all fields in an object?

2008-10-14 Thread az
this is somewhat frequent question, lookup the group in the past if anyone has something usable. maybe something like query(cls).filter( or_(*[column == value for column in alternatives] )) if many values, use column.in_(values) instead of == alternatives can come from

[sqlalchemy] Re: how to query across all fields in an object?

2008-10-14 Thread Jorge Vargas
Yes indeed, we are thinking of going with fulltext search but we don't want to tide up the code to a particular backend right now, specially because this is a functionality that isn't critical at this point in time. On Tue, Oct 14, 2008 at 12:17 PM, Michael Bayer [EMAIL PROTECTED] wrote: more