albertoventurini / graphdb-intellij-plugin

Graph database plugin for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/20417-graph-database
Apache License 2.0
50 stars 14 forks source link

:auto ... call {} in transactions of ... rows -- not recognized #63

Closed neopaf closed 1 year ago

neopaf commented 1 year ago

These structures are not recognized

// soc-feature
:auto load csv with headers from 'file:///RATED_FEATURE.csv' as r
CALL {
with *
match (soc:SOC {soc: trim(r.SOC)})
match (feature:Feature {code: trim(r.FEATURE_CODE)})
merge (soc)<-[:PART_OF]-(feature)
} IN TRANSACTIONS OF 10000 ROWS;

Снимок экрана 2023-01-24 в 12 48 38

Please accept those?

albertoventurini commented 1 year ago

Hi @neopaf, thank you for logging this issue.

I believe ":auto" is a client-side command that has a meaning when used in Neo4j Browser and Neo4j Shell, but it has no meaning elsewhere. (See here for a full list of browser commands: https://neo4j.com/docs/browser-manual/current/reference-commands/) If I run a query that starts with ":auto" via the Neo4j Java Driver (or any other drivers, I believe), I get an error:

Exception in thread "main" org.neo4j.driver.exceptions.ClientException: Invalid input ':': expected
[...]

Therefore, I don't think this plugin should support browser commands such as ":auto".

neopaf commented 1 year ago

right. and without :auto it works smoothly. thanks!