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

Add support for DML statements

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

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

Various DML statements can be translated, including:

  • [ ] INSERT: https://neo4j.com/docs/cypher-manual/current/clauses/create/
    • [x] INSERT .. VALUES: CREATE (n:Type { ... }) syntax
    • [ ] INSERT .. SELECT: MATCH .. CREATE syntax
    • [ ] RETURNING (Firebird, MariaDB, Oracle, PostgreSQL specific syntax to return deleted rows): RETURN?
    • [ ] ON DUPLICATE KEY UPDATE / ON CONFLICT: Probably using MERGE?
  • [ ] UPDATE: https://neo4j.com/docs/cypher-manual/current/clauses/merge/
  • [x] DELETE: https://neo4j.com/docs/cypher-manual/current/clauses/delete/
    • [x] WHERE: Translates to WHERE
    • [ ] USING (PostgreSQL specific DELETE .. JOIN syntax): Translates to ordinary graph declarations
    • [ ] ORDER BY .. LIMIT (MySQL specific syntax to limit the number of rows to be deleted): Perhaps with a subquery?
    • [ ] RETURNING (Firebird, MariaDB, Oracle, PostgreSQL specific syntax to return deleted rows): Perhaps with RETURN?

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

Added truncate in 1e45331.

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