Magnum: A "New Look" for Scala 3 Database Clients
summary
Magnum is a Scala 3 JDBC client that combines macros and structural types to expose a typesafe SQL interpolator that claims to express all SQL on any JDBC database. It generates compile-time generated CRUD repositories and DB codecs, supports database-generated columns, Scala 3 enums, batch updates, and explicit transaction isolation. Dynamic queries use a specs API with seek-pagination for faster pages. A library and examples are built and tested; version 1.0 is published on Maven Central.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 2:00Key Questions
- 2:23Wheres the AI
- 2:57Jane Goodall
- 3:41Simple SQL Operations
- 4:25Complex SQL Operations
- 4:57Scala 3 Database Clients
- 6:30Functional DSLs
- 8:01SQL String Interpolators
- 8:24What makes Magnum unique
- 8:51Connect
- 9:24transact
- 9:41implicits
- 10:51customize transactions
- 11:15SQL interpolator
- 11:43Update
- 12:08Batch Updates
- 12:45Case Class
- 14:03Spring Spring Data
- 14:29Full Repository
- 15:01Database generated columns
- 16:30Specifications
- 17:01Instantiation
- 18:03enums
- 18:23DBCodec
- 18:44Common queries
- 19:16Magnum version 10
related talks
17mHerding types with Scala macros
37mSpring Data in 2023
24mRex "Doobie": A Functional JDBC That Doesn't Hide SQL
43mIt quacks but it’s not a duck structural typing in Scala 3
37mTyqu: Typesafe SQL Queries in Scala
30mPrograms as Values Pure Composable Database Access in Scala
25mMagnolia: Generic Derivation 2.0
48mCompositional, Expressive, Performant Database Queries: Choose 3
