-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
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 overlapping
-
-
QOM.RowIsDistinctFrom
-
(a, b) IS DISTINCT FROM (b, c)
: To be investigated if Cypher has aDISTINCT
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 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:
Metadata
Metadata
Assignees
Labels
No labels