开发者

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 s开发者_如何学运维uch 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?


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.


Mapped projections to the rescue! http://szeiger.de/blog/2009/09/27/a-scala-query-update/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜