ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - jasync-sql/jasync-sql: Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin
Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin - jasync-sql/jasync-sql
Visit Site

GitHub - jasync-sql/jasync-sql: Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin

GitHub - jasync-sql/jasync-sql: Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin

Chat at https://gitter.im/jasync-sql/support Maven Central 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(
               "jdbc:mysql://$host:$port/$database?user=$username&password=$password");
     
// Connection to PostgreSQL DB    
Connection connection = PostgreSQLConnectionBuilder.createConnectionPool(
               "jdbc:postgresql://$host:$port/$database?user=$username&password=$password");
// Execute query
CompletableFuture<QueryResult> future = connection.sendPreparedStatement("select * from table");
// work with result ...
// Close the connection pool
connection.disconnect().get()

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.

Download

Maven

<!-- mysql -->
<dependency>
  <groupId>com.github.jasync-sql</groupId>
  <artifactId>jasync-mysql</artifactId>
  <version>2.2.0</version>
</dependency>

<!-- postgresql -->
<dependency>
    <groupId>com.github.jasync-sql</groupId>
    <artifactId>jasync-postgresql</artifactId>
    <version>2.2.0</version>
</dependency>

Gradle

dependencies {
  // mysql
  compile 'com.github.jasync-sql:jasync-mysql:2.2.0'
  // postgresql
  compile 'com.github.jasync-sql:jasync-postgresql:2.2.0'
}

Additional Modules

  • com.github.jasync-sql:jasync-r2dbc-mysql r2dbc extension.
  • com.github.jasync-sql:postgis-jasync spatial types support for postgres + postgis.
  • com.github.jasync-sql:pool-async async objects pool.
  • com.github.jasync-sql:db-async-common internal module for shared logic.

Overview

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.

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.

DateTime:

Version 1.x always returns JodaTime when dealing with date types and not the java.util.Date class nor jdk-8 dates.
Version 2.x works with java 8 DateTime objects (java.time.LocalDateTime and such).
This post can help with migration.

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.

Zeko SQL Builder compared jasync to hikary and vertex:

Compatibility

Latest & greatest version is Maven Central

The driver was forked from mauricio/postgresql-async and is compatible with it (but not jdbc compatible!). More details in wiki.

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 also FAQ.

Postgis support added in 2.1.7 (see blog post).

Unix domain socket support was added in 2.1.6 (see #175).

Chanlog is currently documented in github release page. Previous ones can be found here and older here.

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.

Support

More links

Contributing

Pull requests are welcome!
See CONTRIBUTING.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory