neo4j / neo4j-dotnet-driver

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

Invariant capable records #780

Closed RichardIrons-neo4j closed 5 months ago

RichardIrons-neo4j commented 5 months ago

This changes the Record type so that it does not contain a dictionary on every instance, instead only containing the array of values, and references to two dictionaries shared across the whole cursor: one just a straight Dictionary<string, object>, and the other of the same type but using an InvariantCultureCaseInsensitive string comparer, so that values can be looked up using a case insensitive key, used in the object mapping.

Added Get and TryGet methods to IRecord and IEntity, and added xxxCaseInsensitive versions of those methods to IRecord.

More tests added, tests modified to create records through TestRecord.Create.