This is a good candidate for raw where clauses in the spirit of RoR's active record. (How we make those type-safe, I don't know.. I'll give it some thought)
liftM2 (nub . (++)) (selectList [TableF1Eq v1, TableF2Eq v2] [] 0 0)
(selectList [TableF1Eq v1, TableF3Eq v2] [] 0 0)
its not very efficient, and mike will yell at me for using nub, but its good enough for 230 am.
goodnight, max
> _______________________________________________
On May 13, 2011, at 2:15 AM, Anton Cheshkov wrote:
> Hi All,
>
> i have the difficulty to build query kind of
>
> select * from Table T where T.f1 = v1 and (T.f2 = v2 or T.f3 = v2)
>
> how to make this one with Yesod Persistent. Are there any ideas ?
>
> Thanks.
>
>
> --
> Best regards,
> Cheshkov Anton
> Phone: +7 909 005 18 82
> Skype: cheshkov_anton
> web-devel mailing list
> web-devel@haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
_______________________________________________
web-devel mailing list
web-devel@haskell.org
http://www.haskell.org/mailman/listinfo/web-devel