Nested and/or expression in subsonic 2.2 -


i need make query :

select * table     cola= "aaa"         ,         (             (colb = "bbb" , (colc="ccc" or colc = "ddd"))             or             (colb="eee" , colc = "fff")         ) 

i tried andexpression(), orexpression(), openexpression() or closeexpression(), can't figure out ! appreciated !

whereexpression, andexpression etc. should work (see this question), doesn't work me time, neither.

as long where clauses relatively simple, add repetition , use logical operator precedence:

select * table     cola="aaa" , colb="bbb" , colc="ccc"           or           cola="aaa" , colb="bbb" , colc="ddd"           or           cola="aaa" , colb="eee" , colc="fff" 

this result in this:

db.select().from<table>()     .where(table.colacolumn).isequalto("aaa")         .and(table.colbcolumn).isequalto("bbb")         .and(table.colccolumn).isequalto("ccc")     .or(table.colacolumn).isequalto("aaa")         .and(table.colbcolumn).isequalto("bbb")         .and(table.colccolumn).isequalto("ddd")     .or(table.colacolumn).isequalto("aaa")         .and(table.colbcolumn).isequalto("eee")         .and(table.colccolumn).isequalto("fff") 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -