Several months ago, the team at
Cockroach Labs reached out to the MyBatis developers asking if we could talk about officially supporting CockroachDB. CockroachDB is wire compatible with PostgreSQL and CockroachDB clients use the PostgreSQL JDBC driver to connect. The team at Cockroach Labs assumed that making changes in MyBatis to support CockroachDB would be relatively easy.
We had a few conversations and it turns out that we didn't need to make any changes in MyBatis to support CockroachDB. I think this is a great validation of the MyBatis approach to database dialects - we don't have one! MyBatis is able to execute SQL against any database that has a JDBC driver. We leave it fully in the hands of developers to write whatever SQL they need for the target database.
That page shows how to use the MyBatis Spring support to easily work with databases and it's a great example of how far these tools have come. There's no XML anywhere to be found - either for Spring or MyBatis.
I really want to thank the team at Cockroach Labs for helping us get to this point - especially Eric Harmeling, Vy Ton, and Andy Woods who have been great working partners.