问题描述
我如何添加多个运算符来应用它:
where deleted is not null and (status in ('PENDING','REMOVING')
or (status='Failed' and published_at is null))
使用 Ruby 和 Sequel
解决方法
解决办法是:
.exclude(deleted: nil)
.where(
Sequel.|(
{ status: %w[PENDING REMOVING] },{ status: 'FAILED',published_at: nil }
)
)