Hey all!  I've got another one for you here.  :)

I have what is actually a very long query full of joins, and I have a filter 
condition that does a bitwise AND like so:

filter("((relationships.person_1_gender_mask & #{mask}) OR 
(relationships.person_1_gender_mask IS NULL))")

Now what I first tried doing was:

filter( {:relationships__person_1_gender_mask.& mask} | 
{:relationships__person_1_gender_mask => nil} )

Obviously, that didn't work.  Additionally, I thought about using the 
sql_function method, but this only works for functions, not operators.  Is 
there a way to do the bitwise operators other than the strings (which isn't a 
bad way to do it anyway, it just mixes idioms)?  :)

-Jeff R

-----
Jeffrey Reinecke
[email protected]
blog.paploo.net





-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en.


Reply via email to