是否有计划支持“类型提供者”对于Scala的SIQ(ScalaIntegratedQuery)像F#? [英] Are there plans to support "type providers" for Scala's SIQ (ScalaIntegratedQuery) like in F#?

查看:402
本文介绍了是否有计划支持“类型提供者”对于Scala的SIQ(ScalaIntegratedQuery)像F#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SIQ的当前状态是呈现由Christopher Vogt在 2011年ScalaDays 上发表。
它显示了查询如何工作和看起来像,但就我记得没有关于如何表示这些类型的概念,e。 G。如果仍然需要写样板代码来解释数据库结构到Scala。

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添加类型提供者(由Don Syme的PDC谈话:视频; GOTO Copenhagen演讲Tomas Petricek: video 幻灯片博文),这使得它基本上不需要在DB(或另一个数据提供者)和语言/类型系统之间手动地写或生成映射,因为语言可以直接从类型提供者从数据库本身查询结构信息。

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.

ScalaIntegratedQuery能否向Scala编译器提供数据库的类型/关系,而不需要用户自己编写样板代码?

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?

推荐答案

答案是YES。我们将提供一个自动解决方案,无需手动样板。当前的SIQ原型使用代码生成,但这方面还没有很好的开发,这就是为什么我没有在Scala天显示它。 SIQ恢复工作,当Stefan Zeiger和我在10月3日在洛桑开始工作时。我们将审查F#类型提供商进一步的灵感。谢谢你的提示!

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!

这篇关于是否有计划支持“类型提供者”对于Scala的SIQ(ScalaIntegratedQuery)像F#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆