Are there plans to support “type providers” for Scala's SIQ (ScalaIntegratedQuery) like in F#?

99封情书 提交于 2019-12-21 03:52:44

问题


The current state of SIQ was presented by Christopher Vogt at ScalaDays 2011. It was shown how queries would work and look like, but as far as I remember there was no notion about how those types would be represented, e. g. if it is still necessary to write boilerplate code to explain the database structure to Scala.

F# 3.0 adds type providers (PDC talk by Don Syme: video; GOTO Copenhagen talk by Tomas Petricek: video, slides, blog post), which make it basically unnecessary to manually write or generate mappings between a DB (or another data provider) and the language/type system, because the language can query structural information from the database itself directly with type providers.

Will ScalaIntegratedQuery be able to provide the types/relationships of a database to the Scala compiler without requiring the user to write boilerplate code themselves?


回答1:


The answer is YES. We will offer an automatic solution, without manual boilerplate. The current SIQ prototype uses code-generation, but this aspect is not very developed yet, which is why I did not show it at Scala Days. Work on SIQ resumes, when Stefan Zeiger and I start our jobs in Lausanne on 3rd of October. We will review F# type providers for further inspiration. Thank you for the hint!



来源:https://stackoverflow.com/questions/7429999/are-there-plans-to-support-type-providers-for-scalas-siq-scalaintegratedquer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!