GithubHelp home page GithubHelp logo

doytsujin / jasync-sql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasync-sql/jasync-sql

0.0 1.0 0.0 2.83 MB

Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin

License: Apache License 2.0

Shell 0.53% Java 2.72% Kotlin 96.75%

jasync-sql's Introduction

jasync-sql

Chat at https://gitter.im/jasync-sql/support Download 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>1.1.3</version>
</dependency>
<!-- postgresql -->
<dependency>
  <groupId>com.github.jasync-sql</groupId>
  <artifactId>jasync-postgresql</artifactId>
  <version>1.1.3</version>
</dependency>

Gradle

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

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.

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?

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.

jasync-sql's People

Contributors

oshai avatar mauricio avatar mst-appear avatar dylex avatar fwbrasil avatar andy-yx-chen avatar magro avatar mirromutth avatar mp911de avatar nyavro avatar ratcashdev avatar dougefresh avatar jcaromiq avatar gumimin avatar yanivgrama avatar xuwei-k avatar kxbmap avatar golem131 avatar sattailanfear avatar njeuk avatar lifey avatar haski avatar dboissin avatar seratch avatar vietj avatar asockalingam avatar antonzherdev avatar pitr avatar nkgm avatar jilen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.