Why it matters

Doobie shapes functional DB access. Understanding enables clean FP Scala DB.

Advertisement

The architecture

fr"SELECT ...": string interpolator with type safety.

Query[T]: typed queries.

Update: for writes.

Doobie APIfr"SELECT"typed interpolatorQuery[T]type-safe resultsConnectionIOtransactional effectType-safe queries: compile-time check of parameters
Doobie components.
Advertisement

How it works end to end

Transactions: transact runs ConnectionIO with connection pool.

Connection pool: HikariCP integration.

Streaming: stream large results via fs2.

Type mapping: Meta[T] typeclass.