Closed illogikal closed 3 years ago
Can you describe what further conditions do you mean?
With xql you can do something like this:
// AND(...) / OR(...) can be used at any time to combine boolean expressions.
return SELECT()
.FROM("tasks")
.WHERE(
OR(AND(COLUMN("duration").GE(10),
COLUMN("duration").LE(20))
,
COLUMN("duration").EQ(0)
)
);
This way it should always be properly parenthesized
Uncaught (in promise) TypeError: import_xql.default.COLUMN(...).LIKE is not a function
xql.COLUMN("icon_title").EQ("")
works
xql.COLUMN("icon_title").LIKE("")
doesnt' work
Uncaught (in promise) TypeError: import_xql.default.COLUMN(...).LIKE is not a function
with sqlite
Thanks, I got it now.
Can you join mulitple clauses like this?
return SELECT()
.FROM("tasks")
.WHERE(
OR(AND(COLUMN("duration").GE(10),
COLUMN("duration").LE(20))
,
COLUMN("duration").LT(-3),
COLUMN("duration").GT(1),
COLUMN("duration").EQ(2)
)
);
QUERY I WANT
SELECT * FROM foos WHERE ((foos.first_field LIKE '%%') OR (foos.other_field LIKE '%%' ) )
My xql code:
my current xql query gives me this:
SELECT * FROM "foos" WHERE "first_field" LIKE '%%' OR "other_field" LIKE '%%'
How do I wrap the parentheses around compound where clauses? I want to do this so I can make further conditions in the query.