When using objects in .Merge or .Set statements, they are embedded in DebugQueryText with quoted names. Formatted like this, those cyphers can't be executed in Neo4jDesktop. This makes troubleshooting larger cyphers much more difficult.
Versions:
Neo4jClient: all Versions
Bolt or Http: both
To Reproduce
var dummyObject = new { key = "value" };
var query = new CypherFluentQuery(client)
.Merge("(foo:Foo $object)")
.WithParam("object", dummyObject)
.Query;
results in this DebugQueryText:
MERGE (foo:Foo {
"key": "value"
})
Executing this in Neo4j will lead to this error:
Invalid input '"': expected whitespace, comment, a property key name
Expected behaviour
I would expect to NOT enclose the property names in quotes, so that DebugQueryString will be executable and should look like this:
MERGE (foo:Foo {
key: "value"
})
Additional context
This could simply be achieved by adding this line in CypherQuery.DebugQueryText before line 106:
serializer.QuoteName = false;
@cskardon I could create a PR including a test if there aren't any concerns from your side.
Description
When using objects in .Merge or .Set statements, they are embedded in DebugQueryText with quoted names. Formatted like this, those cyphers can't be executed in Neo4jDesktop. This makes troubleshooting larger cyphers much more difficult.
Versions:
To Reproduce
results in this DebugQueryText:
Executing this in Neo4j will lead to this error:
Expected behaviour I would expect to NOT enclose the property names in quotes, so that DebugQueryString will be executable and should look like this:
Additional context This could simply be achieved by adding this line in CypherQuery.DebugQueryText before line 106:
serializer.QuoteName = false;
@cskardon I could create a PR including a test if there aren't any concerns from your side.