Search code examples
sqlscalascalaquery

Working with wide SQL tables using ScalaQuery (or something else type-safe)


Many databases have tables with many columns, but ScalaQuery uses tuples to represent table schemas, and Scala doesn't support such wide tuples. Is there any way to work with such tables using ScalaQuery (short of dropping down to executing raw SQL)? If not, is there any other type-safe querying language that supports this?


Solution

  • Squeryl is a Scala MySQL ORM that appears to map table rows to classes using name equivalence, so it should have no problem working with many-column tables. I personally haven't used this but it looks fairly easy to use.