RavenDB-NodaTime icon indicating copy to clipboard operation
RavenDB-NodaTime copied to clipboard

Noda types as metadata

Open ddevader opened this issue 2 years ago • 1 comments

Raven DB doesn't currently easily support complex types as metadata.

Using the Noda types in metadata can currently be done using DynamicJsonValue and duplicating some of your internal logic.

A basic solution might be something like

  1. Offer an extension method for MetadataAsDictionary that uses your internal logic for the conversions. Something like .ToNodaType<T>
  2. Offer an extension method on DynamicJsonValue to add a Noda type. Something like .AddNodaType<T>

Or refactor internal conversion logic for public consumption in order to allow a user of your library to do something similar.

If there is a better/simpler way to do this, let me know.

Thanks in advance for your consideration.

ddevader avatar Apr 10 '23 20:04 ddevader

Could you create a PR with the functionality you want. That might be better to understand your requirements and if they should be in this package.

// Ryan

ryanheath avatar Apr 12 '23 09:04 ryanheath