New DAO suport of MariaDB

What are the plans for the new DAO you are working on?
Would it support MariaDB, or would it enable developers to implement MariaDB DAO?

1 Like

Right now only Postgres and Cassandra. Though writing a strategy for say MariaDB )or any other SQL) wouldn’t be too hard. E.g. this is what we need for Postgres:

A Connector (generic driver):

A DAO (which generates DAOs out of Schemas):

Here is an example schema:

So connector.lua and init.lua for MariaDB would be enough. I guess you could possibly just copy those of Postgres, and then just change where it differs in MariaDB.

We have no plans ATM for Maria at Kong.

Thank you for all instructions. They are very helpful.
Should I expect significant changes to the DAO layer in next Kong releases, or is it already the reworked version? I saw somewhere a message that Kong is refactoring its DAO.


We have three core entities that are not yet moved to new DAO, and we have bundled plugin created entities still on old dao. There is possibility that when moving those, we need to adjust the above mentioned strategies. Then we also need to move migrations to this new db. That’s from the core perspective. Of course there are 3rd party plugins and other features (e.g. Enterprise ones) that will need to be moved to new db. The above links are essentially the refactoring part of this. Also we may change the entities during this process, e.g. API got split into routes and services.

Thank you a lot for the answers.
I assume that adding a new DB type like mysql I’ll need to implement DB-specific migration scripts similar to postgres.lua.

Yes, it would require its own set of migrations.

OK. Thank you a lot.