设为首页 收藏本站
查看: 730|回复: 0

Slick 3.0.0 RC1 发布,Scala 数据库访问层

[复制链接]
累计签到:77 天
连续签到:1 天
发表于 2015-3-4 21:07:07 | 显示全部楼层 |阅读模式
3月21日 深圳 OSC 源创会开始报名罗,送华为海思开发板
  Slick 是 TypeSafe 推出的 Scala 数据库访问库。开发者可以使用 Scala 语言风格来编写数据查询,而不是用 SQL,示例代码:
object?Coffees?extends?Table[(String,?Int,?Double)]("COFFEES")?{  
??def?name?=?column[String]("COF_NAME",?O.PrimaryKey)
  
??def?supID?=?column[Int]("SUP_ID")
  
??def?price?=?column[Double]("PRICE")
  
??def?*?=?name?~?supID?~?price
  
}
  
Coffees.insertAll(
  
??("Colombian",?101,?7.99),
  
??("Colombian_Decaf",?101,?8.99),
  
??("French_Roast_Decaf",?49,?9.99)
  
)?
  
val?q?=?for?{
  
??c??println(n?+?":?"?+?p)?}
  Scala Slick 3.0.0 RC1 发布,源代码现已提供在:https://github.com/slick/slick/tree/3.0.0-RC1。Scala 2.10 (推荐 2.10.4) 和 2.11 (推荐 2.11.4) 构建现已提供在 Maven Central。
  Slick 3.0 主要特性:
  

  •   A new API for composing and executing database actions.
  •   Support for the Reactive Streams API for streaming results from the database.
  •   Improved configuration of database connections via Typesafe Config, including built-in
    support for HikariCP.
  •   Support for nested Option types and non-primtive Option types in the Lifted Embedding.
  •   Properly typed outer join operators based on the improved Option support.
  •   A new macro-based implementation of the Plain SQL API with optional compile-time checking
    and type inference for embedded SQL statements.
  •   Many small improvements and bug fixes in the schema code generator.
  •   Optional multi-line formatting and indenting of generated SQL code for more readable
    debug output.
  更新了大部分手册;“Slick Testkit” 和 “Plain SQL Queries” 章节将会尽快更新;将会尽快提供标准 Activator 模板。
  如果没有发现什么重大问题,将会在后两周发布 Slick 3.0.0 最终版本!
  Slick 2.1.0 以来的完整改进列表:
  

  •   bd0c9c4 Try to prevent some spurious failures on Travis CI
  •   58a1db9 Proper treatment of CHAR(1) columns in JdbcModelBuilder:
  •   7f0f62f Make code generator tests usable from other slick-extensions:
  •   25370cb Fix bugs detected by Slick Extensions upgrade:
  •   12faf5d Upgrade to Reactive Streams 1.0.0.RC3
  •   648184c Package structure and project layout refactoring:
  •   9c730c0 Upgrade to Reactive Streams 1.0.0.RC2:
  •   24770de Add DatabaseConfig as a higher-level configuration abstraction:
  •   759cbc2 Restore #$ support in the macro-based Plain SQL interpolation:
  •   62ddadc Macro-based PlainSQL API Implemented TypedStaticQuery as tsql
  •   d63a018 UUID regression testkit:
  •   0a44b74 Update LiftedEmbedding.scala
  •   5af0d9b Distinguish between BLOB and BYTEA in PostgreSQL model builder
  •   ec7f2aa Use TestDB for code generator tests:
  •   cc8d3f0 Proper support for string lengths:

  •   41c717a Support fetch>
  •   965604c Use force-insert semantics for inserting from queries and expressions.
  •   0e58e7d Deprecate the Direct Embedding
  •   0ba0dd5 Remove the blocking API that was introduced in 3.0.0-M1
  •   2f64c79 Rename Action to DBIO:
  •   86974bd Simplify SQLBuilder and formatting/indenting:
  •   20378ec Quote SqlType argument in code generator.
  •   b1dca21 Make ColumnOptions more modular:
  •   7272180 Use unconstrained text type as default on PostgreSQL
  •   6cec3f7 Prefer prepareStatement(sql) instead of prepareStatement(sql, Int, Int)
  •   a3eec4f Support transaction isolation levels
  •   6ea7fdb Generic fusion implementation for FlatMapAction and CleanupAction:
  •   706f2b1 Allow the SQL statements to be overridden in SqlActions.
  •   a325f5e Run a user-defined init function on all created JDBC Statements
  •   3315a3b Refactoring of ActionContext:
  •   dc687de Avoid long nested sequences of SchemaDescription.++ in generated code:

  •   62d5e92 Quote illegal>
  •   58c4ed5 Make ‘desiredColumnOrder’ in code generator non-final.
  •   a645205 Support statement parameters in the new Action-based API.
  •   b1c5b66 Switch JDBC metadata API and code generator to the new API.
  •   c92a615 Fix typo in orm-to-slick.rst
  •   d4f019f Move profile-level Action definitions outside of profiles.
  •   5cd423f Deprecate Invoker convenience methods and iteratees
  •   7d576c8 Properly deprecate .Implicit and .simple in all profile levels
  •   30c135e Upgrade to sbt 0.13.7
  •   e9274ec Improve build system for documentation:
  •   a6e3b9b Further modularization of Slick:
  •   4ab4a6b Switch Direct Embedding over to the new Action-based API.
  •   ac37f1c Update documentation for 3.0:
  •   e6562c7 Simplify Action Effect handling:
  •   06d1ca0 Increase timeout for Reactive Streams TCK tests.
  •   efbe6f6 Bump version numbers:
  •   4d42528 Add concurrency stress test for streaming API:
  •   80929a6 Documentation plus minor improvements and fixes:
  •   273b957 Update to Reactive Streams 1.0.0.M3 and fix remaining PR review issues:
  •   688d7f2 Convert more test cases and add missing features:
  •   d862e0f Optimize the streaming engine and fix some bugs:
  •   9ad62a9 Implement streaming via Reactive Streams API:
  •   6a85767 Convert several test cases to the new API.
  •   8ef6cde Add basic transaction support for database actions.
  •   09590fd Implement session pinning for database Actions:
  •   66a9b41 Basic implementation of action monad and asynchronous execution engine:
  •   bf17772 Use HikariCP by default (instead of no connection pooling):
  •   4569c52 Simplify connection pool configuration
  •   cc92c26 Simplify thread pool configuration:
  •   423e78c Remove the option to disable auto-commit for new connections.
  •   e4dddcd Remove BoneCP support and drop configuration compatibility with Play.
  •   812100e Add HikariCP support in addition to BoneCP.
  •   bb58103 Add primitives and configuration for async execution of blocking I/O
  •   0ea777a Fix broken build due to merging nested options support
  •   8d4a02f Ensure generated file ends with a newline character.
  •   9cdf7ec Make comment format match others in file.
  •   ef5f9a8 Avoid indenting blank lines, to avoid trailing whitespace.
  •   8225a8f Add Option-extended joins:
  •   75583dc Lifted Embedding encoding of nested and multi-column Option types:
  •   de389a4 Remove the Column type.
  •   5da96b4 Update orm-to-slick.rst
  •   7a1d119 modified to use GlobalConfig.
  •   777dbeb Add SimpleLiteral factory (and fix one unrelated unchecked warning)
  •   82b258f Use Unicode symbols in tree and table dumps for better readability.
  •   f54d272 Add BoneCP support to Database.forConfig.
  •   369ad73 Use application.conf for Slick settings.
  •   61d032b Corrected docs to use “inSet” instead of “inSeq”
  •   b0b0252 Fix forceInsertAll for single argument
  •   770d0a1 Update build for 2.2.0-SNAPSHOT
  •   cb8183d Added support for string function repeat.
  •   57aa9e7 Workaround to pass Travis CI.
  •   7a58f7f Try for SQL String Indentation.
  更多改进内容请看发行说明。
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-43217-1-1.html 上篇帖子: JGroups 3.4.8.Final 发布,Java 组播通讯框架 下篇帖子: MySQL Connector/Python 2.1.1 alpha 发布
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表