You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SQL standard and various dialects support row value expressions both as predicands in predicates, as well as expressions in projections. The latter could be interesting too, in a second step, but for now, I'd like to add support for the former, namely:
QOM.RowIsNull and QOM.RowIsNotNull (they're not inverses!):
(a, b) IS NULL is just a IS NULL AND b IS NULL
(a, b) IS NOT NULL is just a IS NOT NULL AND b IS NOT NULL
QOM.RowCondition:
(a, b) = (c, d) is just a = c AND b = d
(a, b) > (c, d) is a > c OR a = c AND b > d
QOM.RowOverlaps:
(a, b) OVERLAPS (c, d): To be defined. jOOQ has a convenience OVERLAPS, SQL only supports temporal/interval overlapping
QOM.RowIsDistinctFrom
(a, b) IS DISTINCT FROM (b, c): To be investigated if Cypher has a DISTINCT predicate
QOM.RowInCondition:
(a, b) IN ((c, d), (e, f)) is just (a, b) = (c, d) OR (a, b) = (e, f) (and then recurse)
QOM.RowBetweenCondition
(a, b) BETWEEN [ SYMMETRIC ] (c, d) AND (e, f) is just (a, b) >= (c, d) AND (a, b) <= (e, f) (and then recurse)
QOM.RowSubqueryCondition
(a, b) IN (SELECT c, d FROM t) is emulated using EXISTS (SELECT 1 FROM t WHERE (a, b) = (c, d))
This should act as dogfooding catalyst for adding support to those objects int he jOOQ QOM API:
From sql2cypher created by lukaseder: neo4j-contrib/sql2cypher#31
The SQL standard and various dialects support row value expressions both as predicands in predicates, as well as expressions in projections. The latter could be interesting too, in a second step, but for now, I'd like to add support for the former, namely:
QOM.RowIsNull
andQOM.RowIsNotNull
(they're not inverses!):(a, b) IS NULL
is justa IS NULL AND b IS NULL
(a, b) IS NOT NULL
is justa IS NOT NULL AND b IS NOT NULL
QOM.RowCondition
:(a, b) = (c, d)
is justa = c AND b = d
(a, b) > (c, d)
isa > c OR a = c AND b > d
QOM.RowOverlaps
:(a, b) OVERLAPS (c, d)
: To be defined. jOOQ has a convenienceOVERLAPS
, SQL only supports temporal/interval overlappingQOM.RowIsDistinctFrom
(a, b) IS DISTINCT FROM (b, c)
: To be investigated if Cypher has aDISTINCT
predicateQOM.RowInCondition
:(a, b) IN ((c, d), (e, f))
is just(a, b) = (c, d) OR (a, b) = (e, f)
(and then recurse)QOM.RowBetweenCondition
(a, b) BETWEEN [ SYMMETRIC ] (c, d) AND (e, f)
is just(a, b) >= (c, d) AND (a, b) <= (e, f)
(and then recurse)QOM.RowSubqueryCondition
(a, b) IN (SELECT c, d FROM t)
is emulated usingEXISTS (SELECT 1 FROM t WHERE (a, b) = (c, d))
This should act as dogfooding catalyst for adding support to those objects int he jOOQ
QOM
API:The text was updated successfully, but these errors were encountered: