On Wed, 27 May 2015 06:57:56 GMT, Saurabh Das wrote:
I chanced upon this: http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/13722/
serializeToBson(myStruct)
anddeserialize!MyStruct(bson)
are actually a major help as far as ODM is concerned. It's not fully featured, but it is useable enough! I'm going to try that.Great stuff! :)
I was about to mention that. You can now also pass structs directly to the MongoDB API and they'll get serialized automatically: collection.insert(mystruct);
, foreach (s; collection.find!MyStruct(...)) { ... }
The Redis driver also contains some helpers for mapping D types: https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/db/redis/types.d
But the documentation/examples are still lacking a bit.