squeryl 写 or and 的正确语法是什么?
what is the correct syntax for squeryl to write or and?
像这样写 sql 的正确语法是什么 squeryl:
select *
from table
where
(colA = 'value1' or colA = 'value2' )
and colB = 'value3'
???
Nesting Sub Queries下的例子建议您使用简单的and
和or
。你试过这个吗?我的意思是直截了当:
table.where(t =>
((t.colA === "value1") or (t.colA === "value2"))
and (t.colB === "value3"))
这样的代码对我来说似乎工作得很好。
像这样写 sql 的正确语法是什么 squeryl:
select *
from table
where
(colA = 'value1' or colA = 'value2' )
and colB = 'value3'
???
Nesting Sub Queries下的例子建议您使用简单的and
和or
。你试过这个吗?我的意思是直截了当:
table.where(t =>
((t.colA === "value1") or (t.colA === "value2"))
and (t.colB === "value3"))
这样的代码对我来说似乎工作得很好。