You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am currently looking for a method like Collect. Unfortunately, I can't find it. The only possibility I have found so far is to use the collect functionality of the cypher via a raw string. Am I missing the method or does it really not exist?
Versions:
Neo4jClient 5.1.17
Bolt or Http BoltGraphClient
.NET Version .NET 8
Server Version 5.24.0
To Reproduce
[HttpGet("product-detail")]publicasyncTask<IActionResult>GetProductDetailsNeo4J(stringproductId,stringlanguage="en"){varresult=await_neo4jClient.Cypher.Match("(p:Product {Id: $productId})-[:HAS]->(pv:ProductValue)-[:BELONGS_TO]->(a:Attribute)").OptionalMatch("(pv)-[:TRANSLATED]->(vt:ValueTranslation)").WithParam("productId",productId).WithParam("language",language).Return(()=>new{de=Return.As<string>("p.De"),en=Return.As<string>("p.En"),properties=Return.As<List<Dictionary<string,object>>>("COLLECT({ attributeName: CASE $language WHEN 'en' THEN a.En ELSE a.De END, "+"value: CASE $language WHEN 'en' THEN vt.En ELSE vt.De END })")}).ResultsAsync;if(result==null||!result.Any()){returnNotFound($"Product with ID {productId} not found.");}returnOk(result.First());}
Expected behaviour
I thought there might be a “.Collect” C# method.
Additional context
The implementation is realized within an ASP Core application in a controller.
The text was updated successfully, but these errors were encountered:
From my point of view, this wouldn't be helpful, as COLLECT usually is used as an aggregate function besides other variables within WITH- or RETURN-Clauses. This could not be solved with a .Collect method.
Describe the bug
I am currently looking for a method like Collect. Unfortunately, I can't find it. The only possibility I have found so far is to use the collect functionality of the cypher via a raw string. Am I missing the method or does it really not exist?
Versions:
To Reproduce
Expected behaviour
I thought there might be a “.Collect” C# method.
Additional context
The implementation is realized within an ASP Core application in a controller.
The text was updated successfully, but these errors were encountered: