Magnum is a new database client utilizing the full power of Scala 3.
Its key innovation is combining macros and structural types to provide a typesafe, IDE-refactorable SQL interface, which can express all SQL expressions, on all JDBC-supported databases.
Database clients on the JVM fall into three categories.
- Object Oriented Repositories (Spring-Data, Hibernate)
- Functional DSLs (JOOQ, Slick, quill, zio-sql)
- SQL String interpolators (Anorm, doobie, plain jdbc)
This talk will highlight the pros and cons of each approach, and introduce Magnum, a new Scala 3 library combining aspects of all three. Both simple and advanced SQL queries will be compared, with an an emphasis on maintainability, ease of use, and performance.