From e1f80494a84a00902575e2b54cebf4c6808288f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 19 Aug 2018 13:52:42 +0200 Subject: [PATCH] CHANGELOG.md --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cca487f80..ec588d903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,9 @@ Release Notes ### New -- [#397](https://github.com/groue/GRDB.swift/pull/397): JSON encoding and decoding of codable record properties -- [#399](https://github.com/groue/GRDB.swift/pull/399): Codable support: customize the `userInfo` context dictionary, and the format of JSON columns +- [#397](https://github.com/groue/GRDB.swift/pull/397): Codable records: JSON encoding and decoding of codable record properties +- [#399](https://github.com/groue/GRDB.swift/pull/399): Codable records: customize the `userInfo` context dictionary, and the format of JSON columns +- [#401](https://github.com/groue/GRDB.swift/pull/401): Query Interface: set the selection and the fetched type in a single method call - [#393](https://github.com/groue/GRDB.swift/pull/393): Upgrade SQLCipher to 3.4.2, enable FTS5 on GRDBCipher and new pod GRDBPlus. - [#384](https://github.com/groue/GRDB.swift/pull/384): Improve database value decoding diagnostics - Cursors of optimized values (Strint, Int, Date, etc.) have been renamed: FastDatabaseValueCursor and FastNullableDatabaseValueCursor replace the deprecated ColumnCursor and NullableColumnCursor. @@ -19,6 +20,8 @@ Release Notes ### API diff +Fixes: + ```diff class DatabaseQueue { - func write(_ block: (Database) throws -> T) rethrows -> T { @@ -26,7 +29,11 @@ Release Notes - func unsafeReentrantRead(_ block: (Database) throws -> T) throws -> T { + func unsafeReentrantRead(_ block: (Database) throws -> T) rethrows -> T { } +``` +Enhancements to Codable support: + +```diff protocol FetchableRecord { + static var databaseDecodingUserInfo: [CodingUserInfoKey: Any] { get } + static func databaseJSONDecoder(for column: String) -> JSONDecoder @@ -36,7 +43,27 @@ Release Notes + static var databaseEncodingUserInfo: [CodingUserInfoKey: Any] { get } + static func databaseJSONEncoder(for column: String) -> JSONEncoder } +``` +Query Interface: set the selection and the fetched type in a single method call: + +```diff + extension QueryInterfaceRequest { ++ func select(_ selection: [SQLSelectable], as type: RowDecoder.Type) -> QueryInterfaceRequest ++ func select(_ selection: SQLSelectable..., as type: RowDecoder.Type) -> QueryInterfaceRequest ++ func select(sql: String, arguments: StatementArguments? = nil, as type: RowDecoder.Type) -> QueryInterfaceRequest + } + + extension TableRecord { ++ static func select(_ selection: [SQLSelectable], as type: RowDecoder.Type) -> QueryInterfaceRequest ++ static func select(_ selection: SQLSelectable..., as type: RowDecoder.Type) -> QueryInterfaceRequest ++ static func select(sql: String, arguments: StatementArguments? = nil, as type: RowDecoder.Type) -> QueryInterfaceRequest + } +``` + +Deprecations: + +```diff +final class FastDatabaseValueCursor : Cursor { } +@available(*, deprecated, renamed: "FastDatabaseValueCursor") +typealias ColumnCursor = FastDatabaseValueCursor @@ -52,6 +79,7 @@ Release Notes - [Enabling FTS5 Support](README.md#enabling-fts5-support): Procedure for enabling FTS5 support in GRDB. - [Codable Records](README.md#codable-records): Updated documentation for JSON columns, tips, and customization options. - [Record Customization Options](README.md#record-customization-options): A new chapter that gather all your customization options. +- [Fetching from Requests](README.md#fetching-from-requests): Enhanced documentation about requests that don't fetch their origin record (such as aggregates, or associated records). ## 3.2.0