0

What is the correct syntax to write sql like this squeryl:

select * 
    from table
      where 
        (colA = 'value1' or colA = 'value2' )
         and colB = 'value3'

???

Bill P
  • 3,622
  • 10
  • 20
  • 32
AI Joes
  • 69
  • 11

1 Answers1

1

The example under the Nesting Sub Queries suggests that you should use simple and and or. Have you tried this? I mean something straightforward like:

table.where(t =>
    ((t.colA === "value1") or (t.colA === "value2"))
     and (t.colB === "value3"))

Code like this seems to work fine for me.

SergGr
  • 23,570
  • 2
  • 30
  • 51