- 授权协议: BSD
- 开发语言: Scala
- 操作系统: 跨平台
- 软件首页: http://sorm-framework.org/
- 软件文档: http://sorm-framework.org/Documentation.html
- 官方下载: https://github.com/sorm/sorm
软件介绍
scala的orm框架,相比其他orm更为简洁
// Declare a model:
case class Artist( name : String, genres : Set[Genre] )
case class Genre( name : String )
// Initialize SORM, automatically generating schema:
import sorm._
object Db extends Instance(
entities = Set( Entity[Artist](), Entity[Genre]() ),
url = "jdbc:h2:mem:test"
)
// Store values in the db:
val metal = Db.save( Genre("Metal") )
val rock = Db.save( Genre("Rock") )
Db.save( Artist("Metallica", Set(metal, rock) ) )
Db.save( Artist("Dire Straits", Set(rock) ) )
// Retrieve values from the db:
// Option[Artist with Persisted]:
val metallica = Db.query[Artist].whereEqual("name", "Metallica").fetchOne()
// Stream[Artist with Persisted]:
val rockArtists = Db.query[Artist].whereEqual("genres.item.name", "Rock").fetch()
编程珠玑(第二版)
[美] Jon Bentley / 谢君英、石朝江 / 中国电力出版社 / 2004-4 / 28.00元
《编程珠玑(第2版)》是计算机科学方面的经典名著。书的内容围绕程序设计人员面对的一系列实际问题展开。作者Jon Bentley 以其独有的洞察力和创造力,引导读者理解这些问题并学会解决方法,而这些正是程序员实际编程生涯中至关重要的。一起来看看 《编程珠玑(第二版)》 这本书的介绍吧!
