[web-devel] Yesod. Persistent. Disjunction

Max Cantor 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.

max

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]
> 
> Thanks.
> 
> -- 
> Best regards,
> Cheshkov Anton 
> Phone: +7 909 005 18 82
> Skype: cheshkov_anton
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel




More information about the web-devel mailing list