August 04 2014
We are happy to announce the release of Slick 2.1.0. Please see http://slick.typesafe.com/doc/2.1.0/ for documentation including an upgrade guide from 2.0.x. The artifacts are available on Maven Central, as usual. You can find the source code here: https://github.com/slick/slick/tree/2.1.0.
Features and fixes
This is a major feature release.
- Official support for Scala 2.11 and 2.10, cross-built from the same codebase.
- New documentation in the user manual, including chapter for migrating from ORM or SQL to Slick.
- Improved and more comprehensive API documentation.
- Insert-or-update support which makes use of native databases features where possible, falling back to a client-side emulation otherwise.
- Parameters for
dropcalls (required for pagination) can now be used in precompiled queries.
- We don’t use sample projects like
slick-examplesanymore. All samples come in the form of Activator templates with an integrated tutorial. They are tied to a Slick major version but evolve separately from minor releases.
- Configure database connections through Typesafe Config using Database.forConfig, in a format which is compatible with Play’s database configuration (but no support for connection pools yet)
- Outer join emulation: All types of outer joins are now available on all databases. You can check for the corresponding capability flags to see if the support is native or emulated (with different joins and unions).
- OSGi support: Slick and Slick Extensions are now proper OSGi bundles.
- Improved performance when reading JDBC ResultSets, including the option to define even more efficient custom mappings which can completely avoid boxing. See JdbcMapperTest and UnboxedBenchmark for examples.
- Collection type constructor encoding in queries: All collection-valued queries now
contain a type constructor (the default for tables being
Seq, as before) that can be changed with a call to
.to[...](like in Scala Collections) at any point in a query, thus allowing arbitrary collections (including arrays) to be built with
- Additional string methods like
substringcan now be used in queries.
- Insert queries can now be pre-compiled using Compiled, just like other queries.
- Model reverse-engineering from the database schema has been made customizable as the ModelBuilder class. This allows to make up for non-standard conformant jdbc drivers and driver specific-extensions, when generating the model.
- Code generator improvements.
- Two new shapes CaseClassShape and ProductClassShape facilitating the use of classes within queries. See Monomorphic Case Classes.
- TestKit is more flexible and easier to use. You can now use it to test your own extensions for Slick against the standard databases supported by Slick. Less configuration is required due to the use of Typesafe Config with sensible defaults.
The Slick Extensions package with closed-source drivers for Oracle, DB/2 and SQL Server will be published to the Typesafe repository soon. The Slick Example Activator Templates, Slick Codegen Example, Slick Customized Codegen Example projects on github have mostly been updated.
Complete list of changes since Slick 2.0.2
19c5e6fDocument pre-compiled take/drop
a8bd78dAdd ORM to Slick docs / Adapt SQL to Slick
0ef178fDo not run plain SQL against all DBs
3a137feFix MatchError during default value parsing, ignoring more time default functions
cf5b06ffix slick-codegen dependency in upgrade guide
7baf407Fixes for slick-extensions - shorted column names in tests to <= 30 for Oracle - remove default schema PUBLIC for H2(?) - accept integer or char 1 and 0 for mapped non-native booleans - special case integer and date tests to include oracle (should may be handled via a capability at some later point in time) - introduces rawDefault method to allow preprocessing the default value meta data (for simplicity in slick-extensions)
62a5689Add 2.1 upgrade guide
0b1e924Improve docs for nullableNoDefault capability and distinctively test behavior
c205c0eTest Model column round-trips, fix FLOAT mapping According to jdbc SQL standard java.sql.FLOAT is an alias for java.sql.DOUBLE and both should be mapped to scala.Double. The single precision floating point type is java.sql.REAL, which is why we should map scala.Float to java.sql.REAL. see http://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162
745c315Test and fix Boolean and Option default values
60212b6Some other minor fixes.
1aa1383Remove misguided performance optimization from NominalType.
a6f16deAdded ProductClassShape to allow mapping to classes extending Product such as Scala 2.11 case classes.
4b90b3bUse INTEGER for all integral types on SQLite.
b05b411Add Float support to ModelBuilder / Fix MetaModelTest for jtds
7ade0e8Prepare model for binary compatibility with potential future extension
fd22e84Improve reverse engineer to work with slick-extensions - support for Char and BigDecimal caveats: - Boolean mapping still flawed - DBType mapping still flawed and non-portable
65c4544Add a test for Array[Byte] literals.
0b9d8d2Enhance model reverse engineering
2acc05dAdd new ColumnOption Length for string columns
d659d09Move code generator into its own subproject
ea0589aUpdate custom shape docs.
bb4ae81Add scaladoc link checker and fix the currently broken links
c8a28bbAdd the CaseClassShape from #692.
78f543fMove JDBC Meta data API tests into TestKit.
953ccc0Improve new String operations introduced in #843.
2ee426cGenerate table of driver capabilities for the user manual.
39e4fe5Use BIGSERIAL for auto-generated BIGINT columns in PostgresDriver.
b6a4df3Improve error message for unsupported DELETE queries.
3939bb0Expose “open” and “transaction” flags in BaseSession.
b434e8fAdd hashCode/equals methods to the DDL trait
490f7bdIgnore follow-up exceptions when closing a withSession block.
ba71affAdd test case for issue #511
190c50eSet type when inlining aggregation functions.
0ce4f51Add a complete snippet to paste to build
beafa0cBetter scaladoc for extension methods for Column and Query.
885ff9fFix result set debug logging, broken by the previous commit
29a1784Add result set debug logging
5289c0aAdded few string functions
5e331dfAdd performance benchmark logging for JDBC statement execution
1c7c6f5Mark AccessDriver as deprecated.
e7585e2Table constraints and indexes ordered by name. Generated DDL are then unique and thus, difference in DDL can only be the result of a change in the table. Fixes playframework/play-slick#146.
22cdcc2Add some missing cases to Compilable/Executable
9baf84fFix the Shape for Query.
56c7fb7Simplify Rep hierarchy
69abcaeFix docs TOC depth
d74adb5Fix docs TOC depth
b937743Update Scala version to 2.11.1
60e7e89User uppercase identifiers in InsertTest.testInsertOrUpdateAutoInc.
c823c59More flexibility for TestKit
17c298fUse Typesafe Config for database configurations
542e642Improve from SQL to Slick documentation, add operators comparison
03a3eb4Various documentation improvements for 2.1
76efe03Add from SQL to Slick documentation
d1d6a91Fix the build failure from merging tmp/issue-742 & tmp/insert-or-update
bde4ad2OSGi bundle improvements:
d2ac664Restrict Shape.provenShape to only allow unpacked types in ProvenShape.
5234454Fix some bugs in comprehension fusion.
dd15e41Support Unit values in Query return types.
cfee5bbRevert the hconsShape workaround.
f91370fEnforce maxRows in PositionedResultIterator.
be2ff65Prevent some initialization order problems
4fa915cAdd insertOrUpdate to InsertInvoker.
27ba43dMore improvements for Inserts.
0b77999Allow non-literal constant values for Query.take and Query.drop
21f85e9Do not escape columns named tag in generated code
889dae9Don’t patch type changes from OptionApply in hoistClientOps.
3ca772dAdd some hooks to JdbcMappingCompilerComponent.
a10be62Use Scala specialization for ResultConverter.
513c956Use positional access in JDBC ResultConverters.
90cc8bfOptimize conversion of result and parameter values.
935558eDeprecate more operators:
9dccddcImprove scaladoc comments and clean up API for Slick 2.1.
85d4e00Clean up dependencies
c8420b2Improve OSGi integration:
57c87f5Add def size as alias for length to Query for more Scala collections api conformity
047bb07First cut at OSGi-fun for slick.
338e959Fix identity groupBy with type mappings.
18f3cf2Emulate outer joins where necessary.
439305fCorrectly propagate build failures to sbt’s exit code.
76e638cAdd test for outer joins and fix capability declarations.
2dca474Scala 2.11 compatibility.
e71ed6eAdd alias and documentation for ForeignKeyAction
3fc16d8Allow building of non-erased collections through ClassTags.
6e981e5Provide implicit CollectionTypeConstructors
e3ab1d8Allow Query result type constructors to be changed.
0139d27Simplify Query internals.
5c5c657Encode the type constructor for the unpacked collection type into Query.
d0e1e99Remove zero values from ScalaType.
6d1cbd9Simplify Option handling in JdbcProfile.
70a5a2bAdd test case for nesting mapped entities
ce04fe8Modify DDL to run drop phases in LIFO order. Fixes issue #701.
89c3c2eReuse “simple” object for “Implicit” in driver implementations.
c6bc382Remove deprecated features
7e2d6b4Update version numbers for 2.1
Past News Items
Aug 16 2022
If you use Slick, please try 3.4.0-RC3 by changing the version in your build. After a week, if no regressions have been reported we will G-d willing release 3.4.0 (final)....
Apr 23 2021
Slick is community-maintained. Planning for future releases, including for Scala 3, is in progress. Please help if you can! For details, visit [this ticket](https://github.com/slick/slick/issues/2198).
Sep 09 2020
We have just released Slick 3.3.3 You can find the source code here: . Builds for Scala 2.11, 2.12 and 2.13 are available from Maven Central, as usual. ## Highlights...
Jan 30 2019
We have just released Slick 3.3.0 You can find the source code here: . Builds for Scala 2.11 and 2.12 are available from Maven Central, as usual. ## These are...
Mar 23 2018
We have just released Slick 3.2.3. You can find the source code here: . Builds for Scala 2.11 and 2.12 are available from Maven Central, as usual. From 3.2.0 on,...
Mar 06 2018
We have just released Slick 3.2.2. You can find the source code here: . Builds for Scala 2.11 and 2.12 are available from Maven Central, as usual. From 3.2.0 on,...
Jul 20 2017
We have just released Slick 3.2.1. You can find the source code here: . Builds for Scala 2.11 and 2.12 are available from Maven Central, as usual. From 3.2.0 on,...
Feb 24 2017
We have just released Slick 3.2.0. You can find the source code here: . Builds for Scala 2.11 and 2.12 are available from Maven Central, as usual. From this release...