This PR introduce a data persistance interface Persister which is use to add support for PostgreSQL.
The current MongoDB implementation is refactored into database/mongo and the new PostgreSQL implementation will be in database/postgresql.
MongoDB's type and queries are all over the place in the code base. Sub packages like functions and cache are directly calling MongoDB. Lots of dependencies injection will need to be thought carefully, maybe some re-design.
The main goal though is to not touch the public API, so those changes ideally would not break current installs.
This PR introduce a data persistance interface
Persister
which is use to add support for PostgreSQL.The current MongoDB implementation is refactored into
database/mongo
and the new PostgreSQL implementation will be indatabase/postgresql
.MongoDB's type and queries are all over the place in the code base. Sub packages like
functions
andcache
are directly calling MongoDB. Lots of dependencies injection will need to be thought carefully, maybe some re-design.The main goal though is to not touch the public API, so those changes ideally would not break current installs.