MongoDB/DB <-> D

Jot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 27 11:54:20 PDT 2016


Using Vibe.D here;

How can one work with the DB's abstractly without incurring 
duplicity. I'd like to be able to create one struct and use that, 
either in D or the DB. I'd prefer to create a struct in D and 
interact through that struct with the database abstracted away.

struct Person
{
     string name;
     ...
}

Person Joes = Person.Query!name("^Joe.*")

Or whatever is an appropriate example.



What Iwant to avoid is having to duplicate the database 
structures in their native language(json for mongodb).

Or, maybe there is a D struct to json convertor?



More information about the Digitalmars-d-learn mailing list