neo4j-jdbc icon indicating copy to clipboard operation
neo4j-jdbc copied to clipboard

Add support for expressions

Open michael-simons opened this issue 1 year ago • 1 comments

From sql2cypher created by lukaseder: neo4j-contrib/sql2cypher#10

I'll implement more of the expressions() method, to support:

Functions

  • [x] Arithmetic expressions
  • [x] https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/
  • [x] https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/
  • [x] https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/
  • [x] https://neo4j.com/docs/cypher-manual/current/functions/string/
    • Note, there's still quite a few missing features in Cypher-DSL here
  • [ ] https://neo4j.com/docs/cypher-manual/current/functions/temporal/
  • [ ] https://neo4j.com/docs/cypher-manual/current/functions/temporal/duration/
  • [ ] https://neo4j.com/docs/cypher-manual/current/functions/spatial/ ~(won't be available with the jOOQ Open Source edition)~
    • While the parser and QOM API don't have a representation for these things in the jOOQ Open Source Edition, we can specify Settings.parseUnknownFunctions and try to translate things from there.
  • [x] https://neo4j.com/docs/cypher-manual/current/functions/scalar/

Query syntax

  • [x] CASE https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#query-syntax-case
    • [x] CASE abbreviations
    • [x] CASE simple
    • [x] CASE searched
  • [ ] EXISTS (currently not supported in Cypher-DSL, with subqueries?)
  • [ ] COUNT (doesn't have the exact SQL equivalent)

Not yet possible:

  • [x] https://neo4j.com/docs/cypher-manual/current/functions/aggregating/ (still missing jOOQ QOM support, will implement next week)

michael-simons avatar Jan 17 '24 14:01 michael-simons

Really great work on the expressions so far and the TCK works really well.

michael-simons avatar Jan 17 '24 14:01 michael-simons