ReactiveStreams implementation of ScalikeJDBC
Scala Java



This library was moved in ScalikeJDBC officially. Since this Git repository will not be maintained, please use the official library.

It is assumed to be used in batch application. In JDBC, you need to keep connections constantly while subscribing to streaming. Therefore, please reconsider the connection pool setting and always be careful not to exhaust the connection.

Getting Started

supports Scala 2.11.x, 2.12.x

resolvers += "jitpack" at ""
libraryDependencies ++= Seq(
  "com.github.yoskhdia" %% "scalikejdbc-streams" % "<latest version>",
  "com.h2database"  %  "h2"                 % "1.4.+",
  "ch.qos.logback"  %  "logback-classic"    % "1.1.+"

For the full document of ScalikeJDBC please refer to the following


import scalikejdbc._
import scalikejdbc.streams._

// We recommend that you prepare a ThreadPoolExecutor that generates daemon threads
implicit val executor = AsyncExecutor(

val publisher = DB stream {
  sql"select id from users".map(r =>"id")).cursor

Please refer to the document on usage of ScalikeJDBC such as connection pool initialization


For MySQL, PostgreSQL, and others, several settings are required to enable CURSOR (Streaming). In ScalikeJDBC-streams, if driverName can be identified, this setting is automatically enabled. Currently only MySQL and PostgreSQL are supported.

import scalikejdbc._
val poolSettings = ConnectionPoolSettings(driverName = "com.mysql.jdbc.Driver")
ConnectionPool.singleton("jdbc:mysql://", "user", "pass", poolSettings)

With scalikejdbc-config you can easily delegate these settings to application.conf.

ReactiveStreams TCK

TCK is released in ReactiveStreams. ScalikeJDBC-streams passes PublisherVerification. However, although it is also described in Section Structure of the TCK, Some tests can not construct (meaningful) automatic test. If you have a good idea please send me a PullRequest!