问题
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