[web-devel] Yesod. Persistent. Disjunction
mxcantor at gmail.com
Sun Mar 13 17:28:48 CET 2011
(liftM2 (++)) (selectList [TblCol1Eq 1]  0 0) (selectList [TblCol1Eq 2]  0 0)
there are far more efficient ways to concatenate the two lists, but thats basically the jist of it..
do the logic on the app side, its better that way and far more scalable.
On Mar 13, 2011, at 10:18 PM, Anton Cheshkov wrote:
> Hi Michael.
> Please show the way how to perform a query for persistent in disjunction form.
> For example
> select * from Table t where t.c1 = 1 or t.с1 = 2
> Now, for example, selectList function applies filters in conjunctive.
> After that it would be great to see how to make query like
> select * from Table t where t.c1 in [1, 2]
> Best regards,
> Cheshkov Anton
> Phone: +7 909 005 18 82
> Skype: cheshkov_anton
> web-devel mailing list
> web-devel at haskell.org
More information about the web-devel