# doobie

> A pure functional JDBC layer for Scala

Source: https://talira.ai/catalog/doobie-swse7xhw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / sql toolkits](https://talira.ai/categories/libraries/databases/sql-toolkits), [libraries / functional programming](https://talira.ai/categories/libraries/functional-programming)
- Licence: MIT[^1]
- Pricing: Free[^1]
- Free tier: yes[^1]
- Backed by: [Typelevel](https://talira.ai/orgs/typelevel.md)

doobie is a pure functional JDBC layer for Scala and [Cats](https://talira.ai/catalog/cats-sptyhtma.md), a Typelevel project. It isn't an ORM or a relational algebra: you write SQL in a `sql` string interpolator with typed parameters, map the rows to case classes, and compose database programs as values that a transactor runs. It can typecheck queries against the live database schema in unit tests, builds statements from fragments, handles errors, logging and tracing with otel4s, and supports SQL arrays and custom type mappings, with extensions for PostgreSQL and H2.

## Links

- Website: https://typelevel.org/doobie/
- GitHub: https://github.com/typelevel/doobie
- Docs: https://typelevel.org/doobie/docs/01-Introduction.html

## Problems it solves

- query a SQL database from Scala in a purely functional way with Cats Effect
- write plain SQL in Scala but get type-checked results instead of an ORM
- check in my tests that my SQL queries match the database schema
- use JDBC from Scala without side effects leaking everywhere

## Features

- SQL in a string interpolator with typed parameters
- rows mapped to case classes
- database programs as composable values run by a transactor
- typecheck queries against the live schema in unit tests
- statement fragments
- error handling and logging
- tracing with otel4s
- SQL arrays and custom type mappings
- extensions for PostgreSQL and H2

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 1.00, adoption 0.67, momentum 0.36, community 0.93, backing 0.30, extensibility 0.00.

- last commit today
- 62 commits in the last 90 days
- latest release v1.0.0-RC14 8 days ago
- 2.2k GitHub stars
- 205 contributors
- accepts sponsorship (Github, Open Collective, Custom)
- backed by Typelevel

## Alternatives

- [Slick](https://talira.ai/catalog/slick-q0ye0vc9.md): Functional Relational Mapping for Scala

## Sources

[^1]: https://github.com/typelevel/doobie/blob/main/LICENSE (checked 24 Nov 2026)
[^2]: https://typelevel.org/doobie/ (checked 24 Nov 2026)
