Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Functional Relational Mapping Library Slick 2.0 Released

Functional Relational Mapping Library Slick 2.0 Released

Leia em Português

The latest version of Slick, a Functional-Relational Mapping, FRM, library for Scala, comes with reverse-engineering of database schemas and new driver architecture to allow support for non-SQL databases. Changes in the recently released version 2.0 include:

  • A code generator that reverse-engineers a database schema, generating all code required.
  • New driver architecture to enable support for non-SQL, non-JDBC databases.
  • Removal of the flat tuples restriction in table definitions, allowing usage of any type valid as a Query return type.
  • Support of heterogeneous lists for records of arbitrary size in addition to Scala tuples.
  • A new model for pre-compiled queries has replaced the old QueryTemplate abstraction.
  • Besides querying, pre-compiled queries can now also be used for update and delete operations.
  • Soft inserts as the default, removing the need for separate projections for inserts. The old behaviour is still supported.
  • New and more verbose syntax table definitions in the Lifted Embedding standard API to avoid pitfalls in earlier versions.
  • Support for server-side Option conversions.
  • An experimental feature which allows for Query scheduling, allowing usage of tables from multiple databases in a single query.
  • A new Activator template aiming at simplifying getting started with Slick.

In addition to these updates, more than 200 changes are included in the new release. The team have also updated the documentation, including a new getting started guide. This release is not backward compatible, a guide for migration describes the changes from 1.0.

Slick is a relational database access library for the functional language Scala; corresponding to an Object-Relational Mapper, ORM, for object-oriented languages, e.g. Hibernate.
A mailing list for Slick users is available with more than 700 members.

Slick is an open source product with a BSD-style license. Supported database systems include H2, MySQL and PostgreSQL. Drivers for Oracle, IBM DB2, and Microsoft SQL Server are available through a closed-source extension.

Rate this Article