GRDB.swift v5.4.0 Release Notes
-
🚀 Released February 15, 2021 • diff
💥 Breaking Change: The query interface was refactored and some types such as
SQLExpression
are no longer a protocol.This may break some applications that rely on Swift type inference, such as in the following example:
// No longer compiles let values = [Column("score"), Column("score") + Column("bonus")]
The fix is to add an explicit declaration of the desired type:
// A possible fix let values: [SQLExpressible] = [Column("score"), Column("score") + Column("bonus")]
Occurrences of such code breakage should be very rare.
🆕 New: [SQL Interpolation](Documentation/SQLInterpolation.md) supports embedding collations into SQL literals:
let request: SQLRequest<Player> = "SELECT * FROM player ORDER BY email COLLATION \(.nocase)" let request: SQLRequest<Player> = "SELECT * FROM player ORDER BY name COLLATION \(.localizedCompare)"
📚 Documentation update: [Adding support for missing SQL functions or operators](README.md#adding-support-for-missing-sql-functions-or-operators) explains how to extend the query interface when needed.
📚 Documentation update: The [Demo Applications](Documentation/DemoApps/) now provide tests for the database access layer.