Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork139
Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin
License
jasync-sql/jasync-sql
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
jasync-sql is a Simple, Netty based, asynchronous, performant and reliable database drivers forPostgreSQL and MySQL written in Kotlin.
// Connection to MySQL DBConnectionconnection =MySQLConnectionBuilder.createConnectionPool("jdbc:mysql://$host:$port/$database?user=$username&password=$password");// Connection to PostgreSQL DBConnectionconnection =PostgreSQLConnectionBuilder.createConnectionPool("jdbc:postgresql://$host:$port/$database?user=$username&password=$password");// Execute queryCompletableFuture<QueryResult>future =connection.sendPreparedStatement("select * from table");// work with result ...// Close the connection poolconnection.disconnect().get()
See a full example atjasync-mysql-example andjasync-postgresql-example.
More samples on thesamples dir.
For docs and info see thewiki.
<!-- mysql--><dependency> <groupId>com.github.jasync-sql</groupId> <artifactId>jasync-mysql</artifactId> <version>2.2.4</version></dependency><!-- postgresql--><dependency> <groupId>com.github.jasync-sql</groupId> <artifactId>jasync-postgresql</artifactId> <version>2.2.4</version></dependency>
dependencies {// mysql compile'com.github.jasync-sql:jasync-mysql:2.2.4'// postgresql compile'com.github.jasync-sql:jasync-postgresql:2.2.4'}
com.github.jasync-sql:jasync-r2dbc-mysqlr2dbc extension.com.github.jasync-sql:postgis-jasyncspatial types support for postgres + postgis.com.github.jasync-sql:pool-asyncasync objects pool.com.github.jasync-sql:db-async-commoninternal module for shared logic.
This project is a port ofmauricio/postgresql-async to Kotlin.
Why? Because the original lib is not maintained anymore, We use it inob1k, and would like to remove the Scala dependency in ob1k.
If you want information specific to the drivers, check thePostgreSQL README and theMySQL README.
You can view the project's change loghere.
Follow us on twitter:@jasyncs.
Version 1.x always returnsJodaTime when dealing with date types and not thejava.util.Date class nor jdk-8 dates.
Version 2.x works with java 8 DateTime objects (java.time.LocalDateTime and such).
Thispost can help with migration.
- R2DBC
- Spring Data R2DBC
- Vert.x
- micronaut
- Outbrain/ob1k-db
- https://github.com/humb1t/jpom
- Zeko Data Mapper andZeko SQL Builder
- vertx-jooq async module
- ScalikeJDBC Async
- Quill
- Jasync SQL Extensions
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 aTechEmpower test usingktor andjasync-sql.
Zeko SQL Builder compared jasync to hikary and vertex:
The driver was forked frommauricio/postgresql-async and is compatible with it (but not jdbc compatible!). More details inwiki.
R2DBC:
- Initial support in jasync 0.9.51.
- Support for 0.8 released version since jasync 1.0.12.
- Upgrade to GA 1.0 R2DBC (spring boot >= 3) was done in jasync 2.1.0. jaync-sql 2.0.8 will be the last version that's compatible with r2dbc <= 0.9.1. See alsoFAQ.
Postgis support added in 2.1.7 (seeblog post).
Unix domain socket support was added in 2.1.6 (see#175).
Chanlog is currently documented in githubrelease page. Previous ones can be foundhere and olderhere.
Notable changes:
- First driver release is version 0.8.20.
- First driver release to maven is 1.0.0.
- Migrating from joda to java 8 times was done in 2.0.0 (see#233). Versions <= 2.0 are not suppoprted anymore.
- CheckFAQ orKnown Issues orgoogle.
- Open an issue here:https://github.com/jasync-sql/jasync-sql/issues
- Chat on gitter:https://gitter.im/jasync-sql/support
- Ask a question in StackOverflow withjasync-sql tag.
- How we cloned the original lib.
- https://github.com/mauricio/postgresql-async - The original (deprecated) lib.
- Async database access with MySQL, Kotlin and jasync-sql.
- Issue with NUMERIC.
- jasync-sql + javalin example.
- jasync-sql + ktor + coroutines example.
- jasync-sql + spring + kotlin example.
- How to implement an Object Pool with an Actor in Kotlin.
- Coroutines usage.
- Spring Data R2DBC video.
- JDBC for Spring WebFlux: Spring Data R2DBC.
- Spring WebFlux는 어떻게 적은 리소스로 많은 트래픽을 감당할까?.
Pull requests are welcome!
SeeCONTRIBUTING.
About
Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
