KorzhCom / Korzh.DbUtils

Helps to initialize your database and seed it with some data in a most simple and convenient way.
MIT License
76 stars 11 forks source link

MongoDB support #27

Closed fasteddys closed 2 years ago

fasteddys commented 2 years ago

Hello what is required to support mongoDB.

Also I got some errors when my db had some other types like spatial types, updated types.

While debugging I saw it was missing some types

korzh commented 2 years ago

To add support for Mongo (and for any other DB, actually) DbUtils just needs an implementation of a "DB bridge" class that is actually an implementation of 2 interfaces: IDbReader and IDbWriter.

Usually it's just necessary to inherit new class from BaseDbBridge and override a few methods.

As for errors when a DB uses some types. Could you please attach an example of Table definition with those types? And it's better to create a separate issue for this problem.

fasteddys commented 2 years ago

thanks.

I just added the types I needed in the list and the error was gone for now.