# typelevel/doobie

Functional JDBC layer for Scala.

Repository: https://github.com/typelevel/doobie
Canonical: https://ross.abutalabs.com/products/doobie
Homepage: https://typelevel.org/doobie/
Language: Scala
License: MIT
License Family: permissive
Topics: typelevel, fp, functional-programming, scala, database, jdbc
Last push: 2026-08-24T04:32:28+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 64, longevity 100
- inputs: {"age_days": 4664, "days_push": 9, "days_rel": 82, "gap_med": 98, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2225, forks 379 (observed 2026-08-28T04:06:28.028838+00:00)

## What it is
doobie is a pure functional JDBC layer for Scala built on Cats and Cats Effect, providing a monadic API (ConnectionIO) for constructing type-safe database programs. It is not an ORM or relational algebra; it maps JDBC operations into composable functional values with query typechecking and streaming support.

## Use cases
- query a SQL database from Scala in a functional style
- map JDBC result rows to Scala case classes
- typecheck SQL queries against the database schema at test time
- stream large query results with fs2
- manage database connections and transactions with a Transactor
- write unit-testable database code in Cats Effect applications

## When to choose
- you use Cats/Cats Effect and want pure functional database access on the JVM
- you want type-safe JDBC mappings and query validation without a full ORM
- you need composable, streamable database programs in Scala 2 or 3

## When to avoid
- you want an ORM with schema management, relations, and migrations
- your team is not familiar with functional programming and effect systems
- you are not on the JVM/Scala ecosystem

## Facets
- artifact type: library
- maturity: active
- function: database-driver, orm, testing
- domain: databases, backend, developer-tools
- platform: jvm
- tags: jdbc, scala, cats-effect, functional-programming, typelevel, sql, transactor, fs2

## Member repositories
- typelevel/doobie (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:28.028838+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:44:56.604472+00:00, confidence not recorded.
  - readme: https://github.com/typelevel/doobie (fetched 2026-08-28T04:06:28.028838+00:00, sha 3ca34f244fd8)
  - homepage: https://typelevel.org/doobie/ (fetched 2026-08-29T10:25:38.509533+00:00, sha 8a87db032a1f)
  - site_page: https://typelevel.org/doobie/docs/index.html (fetched 2026-08-29T10:25:38.512094+00:00, sha cb455d2696d5)
  - site_page: https://typelevel.org/doobie/docs/01-Introduction.html (fetched 2026-08-29T10:25:38.513870+00:00, sha c207bdd717b2)
  - site_page: https://typelevel.org/doobie/docs/02-Toolkit.html (fetched 2026-08-29T10:25:38.515643+00:00, sha 575611955647)
  - site_page: https://typelevel.org/doobie/docs/03-Connecting.html (fetched 2026-08-29T10:25:38.517409+00:00, sha 4c71ebd3d0eb)
  - site_page: https://typelevel.org/doobie/docs/04-Selecting.html (fetched 2026-08-29T10:25:38.519204+00:00, sha f5f2bd08c4b3)
  - site_page: https://typelevel.org/doobie/docs/05-Parameterized.html (fetched 2026-08-29T10:25:38.521210+00:00, sha e018b12504ae)
  - site_page: https://typelevel.org/doobie/docs/06-Checking.html (fetched 2026-08-29T10:25:38.523212+00:00, sha 02f659d0a6f3)
  - site_page: https://typelevel.org/doobie/docs/07-Updating.html (fetched 2026-08-29T10:25:38.524919+00:00, sha 3668afacdcd0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
