Closed lukaseder closed 7 months ago
This has been fun so far. Improvements to jOOQ/jOOQ#13640 require a new jOOQ snapshot version. Also, I've discovered a flaw in jOOQ: https://github.com/jOOQ/jOOQ/issues/14555
Wow, I'm learning a lot about SQL :)
Kamino closed and cloned this issue to neo4j/neo4j-jdbc
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: