The Scala Persistence Framework is an Open Source, lightweight, simple framework for interacting with relational databases that is written entirely in the Scala programming language. It is available on GitHb and uses the liberal Apache 2.0 license. It is easily extensible to No SQL databases as well. It is designed to ease the transition to Scala for a J2EE programmer. It does not take the approach of using a domain specific language other than SQL. Programmers can use SQL directly. The project is available on GitHub here.
What it does:
- Includes a code generation engine that provides convenient abstractions around JDBC metadata. You can use this tool generate an entire persistence API that is self validating because it includes robust Scala Tests.
- Does not require any configuration or XML files other than one properties file specifying the database connections.
- Supports any database that has a JDBC driver
- Supports complete SQL grammar and all custom SQL dialects
- Supports optimistic locking
- Supports user-defined database functions
- Supports stored procedures
- Supports composite primary keys and auto-generated-keys(database sequences)
- Supports simultaneous connections to different databases
- Runs both inside and outside an application server, similar to the SpringFramework
- Has innovative transactional support that is both statically-typed and declarative. Initially has support for J2EE/SpringFramework “REQUIRED” transaction propagation. Others are simple to implement.
- Supports all J2EE transaction isolation levels using the same statically-typed declarative mechanism
- Will run on any device that supports the Java Virtual Machine 1.6 or greater
- Can easily be extended to support data access objects for NoSQL databases like MongoDB, Hive, or HBase.
- Has no external library dependencies other than the Scala runtime environment, a JRE, and a JDBC driver
- Includes complete suite of automated tests that you can run
- Includes lots of examples that show usage of the preceding features
What it does not do:
- Have a separate domain specific language
- Support cacheing