Skip to content

ScalikeJDBC

ScalikeJDBC is a database access library for Scala that provides a thin, idiomatic wrapper around JDBC. Kazuhiro Sera created it in 2011 as an alternative to heavier ORM frameworks, keeping the developer close to SQL while adding Scala-specific conveniences like type safety, pattern matching on results, and functional composition of queries.

The current release is ScalikeJDBC 4.3, supporting Scala 2.12, 2.13, and Scala 3. The library offers two approaches: a SQL interpolation syntax for writing raw SQL with compile-time safety, and a QueryDSL for programmatic query construction. Built-in connection pooling (via Commons DBCP) manages database connections, and the library works with PostgreSQL, MySQL, H2, Oracle, SQL Server, and other JDBC-compatible databases. An optional ORM module inspired by Rails' ActiveRecord provides automatic mapping between database rows and Scala objects.

The official documentation covers setup, SQL interpolation, and the QueryDSL. The source code is on GitHub under the Apache 2.0 license.

scalikejdbc.org

Related technologies

Let's build something together

Whether it's a shared project, a partnership, or contributing to something bigger — we're always open to building together.