Changelog History
Page 1
-
v6.3.1 Changes
๐ Released November 11, 2022 • diff
- ๐ New: DocC documentation is hosted at https://swiftpackageindex.com/groue/GRDB.swift/documentation
-
v6.0.0 Changes
๐ Released September 9, 2022 • diff
- ๐ New: Bump custom SQLite builds v3.39.3
- ๐ Fixed: #1274 Fixed a bug with HasManyThrough associations when the "through" association has the same association key as the association itself.
- ๐ Fixed: #1275 Enhance error message for some requests involving associations on common table expressions.
- ๐ Fixed: #1276 Fix build error with Xcode 14.0 RC (14A309)
- ๐ฅ Breaking Change: Request methods that accept a closure with a
Database
argument have been renamed with theWhenConnected
suffix:request.filterWhenConnected { db in ... }
, etc.
-
v6.0.0-beta.4 Changes
๐ Released August 28, 2022 • diff
- ๐ New: #1271 by @groue: Bump custom SQLite builds v3.39.2
- ๐ New: SQLITE_OPEN_EXRESCODE, when available, exposes [extended result codes](README.md#databaseerror) when opening a database connection.
- ๐ Fixed: PRAGMA table_list, when available, makes it possible for GRDB to detect WITHOUT ROWID tables without polluting the SQLite error log.
- ๐ฅ Breaking Change: The
GRDB.xcodeproj
orGRDBCustom.xcodeproj
projects now define cross-platforms targets. - ๐ Documentation Update: [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md) describes how to update applications that directly embed the
GRDB.xcodeproj
orGRDBCustom.xcodeproj
project. - ๐ Documentation Update: [Custom SQLite Builds](CustomSQLiteBuilds.md) was updated for the new cross-platform target defined by the
GRDBCustom.xcodeproj
project.
-
v6.0.0-beta.3 Changes
๐ Released August 25, 2022 • diff
- ๐ Fix: #1268 by @groue: Fix SQL generation of CHECK constraints
- ๐ฅ Breaking Change: The
Column
type is no longerEquatable
- ๐ Documentation Update: [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md) describes in detail how to update records that customize their persistence methods.
- ๐ Documentation Update: The [Single-Row Tables](Documentation/SingleRowTables.md) guide was updated for the new persistence callbacks.
-
v6.0.0-beta.2 Changes
๐ Released August 23, 2022 • diff
- ๐ New: Extended UPSERT apis with the ability to define the conflict target, and the assignments performed in case of conflicts.
- ๐ Documentation Update: A new [Upsert](README.md#upsert) chapter describes upserts in detail.
-
v6.0.0-beta Changes
๐ Released August 21, 2022 • diff
๐ New
๐ Upgrading your app can bring improvements: check [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md) for some suggestions.
๐ :star: Support for
UPSERT
:player.upsert(db)
, etc. See [Persistence Methods](README.md#persistence-methods).๐ :star: Support for the
RETURNING
clause:player.insertAndFetch(db)
,Player.deleteAndFetchAll(db)
, etc. See [Persistence Methods and theRETURNING
clause](README.md#persistence-methods-and-the-returning-clause).:star: [Persistence Callbacks](README.md#persistence-callbacks) allow record types to customize persistence methods:
didInsert
,willSave
, etc.๐ :star: Better support for unexpected database values. Where GRDB 5 would crash during encoding and decoding database values, GRDB 6 has learned to throw errors instead. Record protocols throw decoding and encoding errors, and value requests throw errors on invalid inputs.
Request protocols and cursors now define primary associated types, enabled by SE-0346.
All persistence methods now accept an explicit conflict policy:
player.insert(db, onConflict: .replace)
, etc.You can append the contents of a cursor to a collection with
RangeReplaceableCollection.append(contentsOf:)
.ValueObservation.map
now accepts a throwing closure argument.
๐ Documentation Updates
- ๐ :star: [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md): suggestions for improving your applications, and guidance for handling the breaking changes.
- The [Persistence Methods](README.md#persistence-methods) chapter introduces the
upsert
method. - โก๏ธ The [Persistence Methods and the
RETURNING
clause](README.md#persistence-methods-and-the-returning-clause) chapter introduces persistence methods that fetch inserted, updated and deleted values. - The [Persistence Callbacks](README.md#persistence-callbacks) chapter introduces the callback invoked from persistence methods, such as
didInsert
,willSave
, etc. - โก๏ธ The [DatabaseRegionObservation](README.md#databaseregionobservation) chapter was updated for the new
DatabaseRegionObservation.start
method. - โช The [Transaction Hook](README.md#transaction-hook) chapter describes the new
Database.afterNextTransaction(onCommit:onRollback:)
method. - The [Value Queries](README.md#value-queries) chapter explains how to distinguish a request that returns no value from a request that fetches a NULL value.
๐ฅ Breaking Changes
- โ Removed deprecated methods
- :star: Bumped requirements:
- Swift 5.7+ and Xcode 14+ are required.
- iOS 11.0+ / macOS 10.13+ / tvOS 11.0+ / watchOS 4.0+ / SQLite 3.19.3+ are required.
- ๐จ :star: Record protocols were refactored:
- The
FetchableRecord.init(row:)
initializer can now throw errors. - The
EncodableRecord.encode(to:)
method can now throw errors. - Record types can no longer override persistence methods. You use [Persistence Callbacks](README.md#persistence-callbacks) instead.
- The
- Various breaking changes:
- The in-memory
DatabaseQueue()
initializer can now throw errors. - The
selectID()
method is replaced withselectPrimaryKey(as:)
. Cursor.isEmpty
is now a throwing property, instead of a method.- The
Record.copy()
method was removed, without replacement. - The
DerivableRequest.limit(_:offset_:)
method was removed, without replacement. DatabaseRegionObservation.start(in:onError:onChange:)
now returns a cancellable.- The
DatabaseRegionObservation.extent
property was removed. - The
statement
property of database cursors was replaced with read-only properties such assql
orcolumnNames
. - The
Database.afterNextTransactionCommit(_:)
method was renamedDatabase.afterNextTransaction(onCommit:onRollback:)
, and is now able to report rollbacks as well as commits.
- The in-memory