Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Error when executing a .cypher with a :param line that contains a datetime function #286

@vga91

Description

@vga91

The issue neo4j-contrib/neo4j-apoc-procedures#1728 seems to be due to cypher-shell.

Steps to reproduce

Step 1 - Create a .cypher with a :param line that contains a datetime function, like this:

:begin
CREATE CONSTRAINT ON (node:`UNIQUE IMPORT LABEL`) ASSERT (node.`UNIQUE IMPORT ID`) IS UNIQUE;
:commit
:begin
:param rows => [{_id:1, properties:{created:datetime('2020-11-26T21:36:04.212Z')}}]
UNWIND $rows AS row
CREATE (n:`UNIQUE IMPORT LABEL`{`UNIQUE IMPORT ID`: row._id}) SET n += row.properties SET n:TestNode;
:commit
:begin
MATCH (n:`UNIQUE IMPORT LABEL`)  WITH n LIMIT 20000 REMOVE n:`UNIQUE IMPORT LABEL` REMOVE n.`UNIQUE IMPORT ID`;
:commit
:begin
DROP CONSTRAINT ON (node:`UNIQUE IMPORT LABEL`) ASSERT (node.`UNIQUE IMPORT ID`) IS UNIQUE;
:commit

Step 2 - Execute cat backup.cypher | cypher-shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions