Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

[openCypher Compatibility] Support for parameters #675

Closed
randomJoe211 opened this issue Jan 22, 2021 · 6 comments
Closed

[openCypher Compatibility] Support for parameters #675

randomJoe211 opened this issue Jan 22, 2021 · 6 comments
Labels
enhancement Type: make the code neat or more efficient incompatible PR: incompatible with the master branches in the storage or common repos

Comments

@randomJoe211
Copy link
Contributor

I can't create nodes from a list parameter because nGQL does not support parameters yet.

image

@randomJoe211 randomJoe211 added the incompatible PR: incompatible with the master branches in the storage or common repos label Jan 22, 2021
@czpmango
Copy link
Contributor

This is the format of openCypher's tck test case.
It is recommended to execute the statement in the neo4j console to ensure the accuracy of the description.

@czpmango
Copy link
Contributor

czpmango commented Jan 22, 2021

:param events=>[{ year : 2014, id : 1},{ year : 2014, id : 2}];
unwind $events as event
merge (y:Year {year:event.year})
merge (y)<-[:IN]-(e:Event {id:event.id})
return e.id as x
order by x;

@czpmango
Copy link
Contributor

This is my test in neo4j console:

neo4j@neo4j> :param events=>[{ year : 2014, id : 1},{ year : 2014, id : 2}];
neo4j@neo4j> unwind $events as event
             merge (y:Year {year:event.year})
             merge (y)<-[:IN]-(e:Event {id:event.id})
             return e.id as x
             order by x;
+---+
| x |
+---+
| 1 |
| 2 |
+---+

2 rows available after 1376 ms, consumed after another 830 ms
Added 3 nodes, Created 2 relationships, Set 3 properties, Added 3 labels

@czpmango
Copy link
Contributor

@randomJoe211
You could use the markdown format to describe the issue instead of the picture. Because the picture is not convenient to copy.

@randomJoe211
Copy link
Contributor Author

@randomJoe211
You could use the markdown format to describe the issue instead of the picture. Because the picture is not convenient to copy.

Sure. I'll do that. Thanks.

@czpmango czpmango added the enhancement Type: make the code neat or more efficient label Mar 23, 2021
@CPWstatic
Copy link
Contributor

Please keep track with vesoft-inc/nebula#2593

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: make the code neat or more efficient incompatible PR: incompatible with the master branches in the storage or common repos
Projects
None yet
Development

No branches or pull requests

3 participants