neo4j / neo4j-dotnet-driver

Neo4j Bolt driver for .NET
Apache License 2.0
227 stars 69 forks source link

Getting results from generic nodes #811

Closed josephsctan closed 3 weeks ago

josephsctan commented 3 weeks ago

Is your feature request related to a problem? Please describe. Seems to be difficult to return generic nodes if we don't know the properties before hand, because Neo4j.Driver.Internal.Types.Node is internal. E.g., I'm building an interface that lets the end user specify their database and a query, so it is not possible to map results, since MATCH (n) RETURN n can return any kind of entity, having any number of properties. The package does not have an easy way to iterate over the available Labels and Properties of the results because the Node is internal.

Describe the solution you'd like Make Neo4j.Driver.Internal.Types.Node public.

Describe alternatives you've considered Reverse engineer Neo4j.Driver.Internal.Types.Node into a local class, Neo4jDriverTypesNode, and use "Deserialize-Cast" to convert the generic nodes returned from driver.ExecutableQuery into objects of type Neo4jDriverTypesNode . It works, but making Neo4j.Driver.Internal.Types.Node public would be so much easier.

thelonelyvulpes commented 3 weeks ago

@josephsctan The drivers exposes IEntity, INode, IRelationship and IPath, These can be mapped to, if you have a need for the concrete class, please explain that.