• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jasync-sql/jasync-sql: Java & Kotlin Async DataBase Driver for MySQL and Pos ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jasync-sql/jasync-sql

开源软件地址(OpenSource Url):

https://github.com/jasync-sql/jasync-sql

开源编程语言(OpenSource Language):

Kotlin 96.7%

开源软件介绍(OpenSource Introduction):

jasync-sql

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.0.7</version>
</dependency>
<!-- postgresql -->
<dependency>
  <groupId>com.github.jasync-sql</groupId>
  <artifactId>jasync-postgresql</artifactId>
  <version>2.0.7</version>
</dependency>

Gradle

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

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?

jasync-sql-production

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:
jasync-sql-zeko

Support

More links

Contributing

Pull requests are welcome!
See CONTRIBUTING.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
eric-wood/excel2latex: Javascript .xlsx to LaTeX table converter发布时间:2022-07-09
下一篇:
cnblogs-/latex-model: LaTex-Model发布时间:2022-07-09
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap