Skip to content

joepeding/mysql-native-sqldelight

Repository files navigation

mysql-native-sqldelight

A Kotlin native MySQL driver using libmysqlclient. Initial work inspired on postgres-native-sqldelight.

You can use the driver with SQLDelight, but this is not required.

Contents

Caveats

  1. MySQL does not support nested transactions. While this driver will handle SQLDelight's post-commit and -rollback hooks correctly for nested tranactions, the actual transaction is implicitly committed as soon as the new 'nested' transaction is started. This may be solved in the future by implementing SAVEPOINTs.

Testing

./gradlew clean allTests --info

Documentation

Deployed with FTP Deploy Action

Documentation is automatically generated for the latest commit in main and published to sqldelight.joepeding.nl. To manually generate the documentation, run the following command to generate HTML documentation from KDoc:

./gradlew clean dokkaHtmlMultiModule

Then open build/dokka/htmlMultiModule/index.html to browse the generated documentation

Licensing

The code written in this repository is released under the Apache License 2.0. Of note:

  • This library statically links libmysqlclient from MySQL, which is released under GPLv2 but also subject to the Universal FOSS Exception, therefore not mandating release of this library under GPL too.
  • This library statically links libssl and libcrypto from OpenSSL 3, which is also released under Apache License 2.0