Permalink
Browse files

Add migration guide and remove 3.1 bincompat shims

  • Loading branch information...
1 parent b87abdf commit 7fb013e448154ed50da3c3d4689a4853b00d8a59 @szeiger szeiger committed Feb 10, 2017
View
@@ -1,7 +1,7 @@
Slick
=====
-[![Build Status](https://travis-ci.org/slick/slick.png?branch=3.1)](https://travis-ci.org/slick/slick) [![Stories in Ready](https://badge.waffle.io/slick/slick.png?label=1%20-%20Ready)](https://waffle.io/slick/slick) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/slick/slick?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+[![Build Status](https://travis-ci.org/slick/slick.png?branch=master)](https://travis-ci.org/slick/slick) [![Stories in Ready](https://badge.waffle.io/slick/slick.png?label=1%20-%20Ready)](https://waffle.io/slick/slick) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/slick/slick?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Slick is a modern database query and access library for Scala. It allows you
to work with stored data almost as if you were using Scala collections while
@@ -670,17 +670,6 @@ final case class IfThenElse(clauses: ConstArray[Node]) extends SimplyTypedNode {
def ifThenClauses: Iterator[(Node, Node)] =
clauses.iterator.grouped(2).withPartial(false).map { case List(i, t) => (i, t) }
def elseClause = clauses.last
- /** Return a null-extended version of a single-column IfThenElse expression */
- def nullExtend: IfThenElse = { //TODO 3.2: Remove this method. It is only preserved for binary compatibility in 3.1.1
- def isOpt(n: Node) = n match {
- case LiteralNode(null) => true
- case _ :@ OptionType(_) => true
- case _ => false
- }
- val hasOpt = (ifThenClauses.map(_._2) ++ Iterator(elseClause)).exists(isOpt)
- if(hasOpt) mapResultClauses(ch => if(isOpt(ch)) ch else OptionApply(ch)).infer()
- else this
- }
}
/** Lift a value into an Option as Some (or None if the value is a `null` column). */
@@ -249,9 +249,6 @@ class RewriteJoins extends Phase {
case j => j
}
- // binary compatibility shim for 3.1
- def rearrangeJoinConditions(j: Join): Join = rearrangeJoinConditions(j, Set.empty)
-
/** Merge nested mapping operations of the form `Bind(_, Bind(_, _, Pure(StructNode(p1), _)), Pure(StructNode(p2), _))`
* into a single Bind, provided that each element of either p1 or p2 contains not more than one path.
* This transformation is not required for the correctness of join rewriting but it keeps the
@@ -119,6 +119,8 @@ size when using
Slick uses *prepared* statements wherever possible but it does not cache them on its own. You
should therefore enable prepared statement caching in the connection pool's configuration.
+.. _databaseconfig:
+
DatabaseConfig
--------------
@@ -10,7 +10,7 @@ Upgrade Guides
Compatibility Policy
====================
-Slick requires Scala 2.10 or 2.11. (For Scala 2.9 please use ScalaQuery_, the predecessor of Slick).
+Slick 3.2 requires Scala 2.11 or 2.12 and Java 8.
Slick version numbers consist of an epoch, a major and minor version, and possibly a qualifier
(for milestone, RC and SNAPSHOT versions).
@@ -35,3 +35,33 @@ Upgrade from 3.1 to 3.2
This section describes the changes that are needed when upgrading from Slick 3.1 to 3.2. If you are
currently using an older version of Slick, please see the older `Slick Manuals`_ for details on other
changes that may be required.
+
+Profiles vs Drivers
+-------------------
+
+Slick's `driver` concept has been renamed to `profile` to end the confusion over Slick drivers vs JDBC drivers.
+All references to `drivers` from now on refer to JDBC drivers. Slick `profiles` can be either abstract
+(like :api:`JdbcProfile <slick.jdbc.JdbcProfile>`) or
+concrete (like :api:`H2Profile <slick.jdbc.H2Profile>`). The old names are still available as deprecated
+forwarders.
+
+The renaming also affects configuration parameters (for example, for :ref:`Databaseconfig <databaseconfig>`).
+The old parameter names are still supported but their use will generate warnings at runtime.
+
+Slick Extensions
+----------------
+
+The `Slick Extensions` package with additional profiles for Oracle, DB2 and SQL Server does not exist
+anymore for Slick 3.2. These profiles have been added to the core Slick package:
+
+* :api:`OracleProfile <slick.jdbc.OracleProfile>`
+* :api:`DB2Profile <slick.jdbc.DB2Profile>`
+* :api:`SQLServerProfile <slick.jdbc.SQLServerProfile>`
+
+Database Action Scheduling
+--------------------------
+
+When configuring a :doc:`database connection <database>` with a connection pool with a limited maximum size, you
+should always specify the correct size limit in Slick. This is necessary to prevent deadlocks when using transactions
+(or other pinned sessions). The configuration is done automatically when using Slick's built-in HikariCP support.
+You only need to configure it manually if you use a connection pool through a JDBC `DataSource` or JNDI name.

0 comments on commit 7fb013e

Please sign in to comment.