4sh / datamaintain

One tool to maintain all your database schemas!
Apache License 2.0
25 stars 6 forks source link

MongoDriver : allow to choose kotlinx, Jackson or a custom implementation #174

Closed nroulon closed 2 years ago

nroulon commented 2 years ago

At the moment MongoDriver serialize objet in JSON. For other issues we need to serialize Script in BSON but it can be result on conflict with project dependency that import datamaintain.

Tasks :

Document how to implement a custom driver from mongoDriver dependency if kotlinx or jackson is not use or incompatible.

nroulon commented 2 years ago

WIP on the branch #174

Refacto for add JsonMapper interface with two methods :

The mongo code call the JsonMapper directly with two types :

3 implementations of JsonMapper (last version only) :

All implementation import the module driver-mongo-mapping-test for ensure that implementation works and respect some rule (allowed unknown fields on serialization for example)

Default implementation for tests and cli is Serialization.

nroulon commented 2 years ago

WIP :

The idea is to be able to load the JsonMapper by :

nroulon commented 2 years ago

Move in 3.0.0.