For me current behaviour of or_where
is quite misleading and problematic. To show what I mean:
from foo in "foos",
where: foo.a == "a",
or_where. foo.b == "b",
where: foo.c == "c",
select: {foo.a, foo.b, foo.c}
Will end up as:
SELECT
foo.a,
foo.b,
foo.c
FROM foos foo
WHERE
((foo.a = "a") OR (foo.b = "b"))
AND (foo.c = "c")
Instead I would expect it to be:
SELECT
foo.a,
foo.b,
foo.c
FROM foos foo
WHERE
(foo.a = "a")
OR (foo.b = "b")
AND (foo.c = "c")
I can see why or_where
was implemented how it was implemented, however I think that the second behaviour would be cleaner.