Skip to content
Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin
Branch: master
Clone or download
Latest commit 8e168f4 Apr 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
db-async-common fix an issue of timeout in connection creation, even if timeout did n… Apr 3, 2019
mysql-async change the default utf8 encoding Apr 7, 2019
r2dbc-mysql fix typo in class name Mar 28, 2019
samples Update Mar 21, 2019
the-old-files move unused files to directory of old files Jan 28, 2019
.gitignore add DS_Store to .gitignore Mar 11, 2019
.travis.yml add netty leak checks to travis build Mar 11, 2019 Update Apr 8, 2019 move unused files to directory of old files Jan 28, 2019
LICENSE.txt Update LICENSE.txt Nov 7, 2018
build.gradle add r2dbc-mysql Mar 19, 2019 add netty leak checks to travis build Mar 11, 2019
gradlew.bat Adding gradle wrapper Aug 27, 2018
jas.png Add files via upload Oct 10, 2018
production.png Add files via upload Feb 11, 2019
versions.gradle update netty to 4.1.34.Final Mar 11, 2019


Chat at Download Build Status Apache License V.2 codecov Awesome Kotlin Badge

jasync-sql is a Simple, Netty based, asynchronous, performant and reliable database drivers for PostgreSQL and MySQL written in Kotlin.

Show your ❤ with a ★

Getting started

// Connection to MySQL DB
Connection connection = MySQLConnectionBuilder.createConnectionPool(
// Connection to PostgreSQL DB    
Connection connection = PostgreSQLConnectionBuilder.createConnectionPool(

// Execute query
CompletableFuture<QueryResult> future = connection.sendPreparedStatement("select * from table");
// work with result ...
// Close the connection pool

See a full example at jasync-mysql-example and jasync-postgresql-example.
More samples on the samples dir.

For docs and info see the wiki.



<!-- mysql -->
<!-- postgresql -->
<!-- add jcenter repo: -->


dependencies {
  // mysql
  compile 'com.github.jasync-sql:jasync-mysql:0.9.51'
  // postgresql
  compile 'com.github.jasync-sql:jasync-postgresql:0.9.51'
// add jcenter repo:
repositories {


This project is a port of mauricio/postgresql-async to Kotlin.
Why? Because the original lib is not maintained anymore, We use it in ob1k, and would like to remove the Scala dependency in ob1k.

This project always returns JodaTime when dealing with date types and not the java.util.Date class. (We plan to move to jdk-8 dates).

If you want information specific to the drivers, check the PostgreSQL README and the MySQL README.

You can view the project's change log here.

Follow us on twitter: @jasyncs.

Who is using it

Add your name here!

Is it used in production on large scale?


The graph above is from only couple of services using it. Y-Axis is # of queries per minute.

There is also a TechEmpower test using ktor and jasync-sql.


More links


Pull requests are welcome!

You can’t perform that action at this time.