You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
7
7
8
8
#### 5.x Releases
9
9
10
+
- `5.13.x` Releases - [5.13.0](#5130)
10
11
- `5.12.x` Releases - [5.12.0](#5120)
11
12
- `5.11.x` Releases - [5.11.0](#5110)
12
13
- `5.10.x` Releases - [5.10.0](#5100)
@@ -79,6 +80,24 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
79
80
80
81
---
81
82
83
+
## 5.13.0
84
+
85
+
Released November 7, 2021 • [diff](https://github.com/groue/GRDB.swift/compare/v5.12.0...v5.13.0)
86
+
87
+
- **Breaking Change**: [#1076](https://github.com/groue/GRDB.swift/pull/1076) by [@groue](https://github.com/groue): Require Swift 5.3 and Xcode 12
88
+
- **New**: :star: [#1088](https://github.com/groue/GRDB.swift/pull/1088) by [@groue](https://github.com/groue): Shared ValueObservation
89
+
- **New**: :star: [#1095](https://github.com/groue/GRDB.swift/pull/1095) by [@groue](https://github.com/groue): Precise foreign key checks for migrations
90
+
- **New**: [#1078](https://github.com/groue/GRDB.swift/pull/1078) by [@groue](https://github.com/groue): Non-mutating persistence methods `saved` and `inserted`, and existence-checking methods `isEmpty` and `exists`
91
+
- **New**: `DatabasePool.erase()` prevents concurrent reads until it has completed.
92
+
- **New**: The `close()` method allows precise closing of database connections.
93
+
- **New**: Filtering records by single-column primary key now properly encodes dates and uuids according to the customized strategies (`filter(id:)`, `deleteAll(_:keys:)`, etc.)
94
+
- **New**: `DatabaseUUIDEncodingStrategy.lowercaseString` can encode UUID as a lowercased string. For clarity, the `string` strategy has been deprecated and renamed `uppercaseString`.
95
+
- **Documentation Update**: :star: The [Concurrency Guide](Documentation/Concurrency.md) got a major overhaul.
96
+
- **Documentation Update**: :star: A new [ValueObservation Sharing](README.md#valueobservation-sharing) chapter describes how to share database observations and spare database resources.
97
+
- **Documentation Update**: :star: The [Migrations](Documentation/Migrations.md) guide tells how you can mitigate slow foreign key checks during schema changes.
98
+
- **Documentation Update**: The [Date and UUID Coding Strategies](README.md#date-and-uuid-coding-strategies) chapter describes the new support for date and uuid primary key coding in requests by single-column primary key.
99
+
- **Documentation Update**: A new [Testing for Record Existence](README.md#testing-for-record-existence) chapter describes the new `request.isEmpty(_:)`, `Record.exists(_:id:)` and `Record.exists(_:key:)` methods.
100
+
82
101
## 5.12.0
83
102
84
103
Released September 25, 2021 • [diff](https://github.com/groue/GRDB.swift/compare/v5.11.0...v5.12.0)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Starting points:
118
118
119
119
GRDB has a strong focus on safe concurrency. Not only safe as "does not crash", but safe as "actively protects your application data". The topic is discussed in (too) many places:
-[Four different ways to handle SQLite concurrency](https://medium.com/@gwendal.roue/four-different-ways-to-handle-sqlite-concurrency-db3bcc74d00e)
124
124
-[Good Practices for Designing Record Types](https://github.com/groue/GRDB.swift/blob/master/Documentation/GoodPracticesForDesigningRecordTypes.md#fetch-in-time)
@@ -313,7 +313,7 @@ Features that blur this focus are non-goals:
Copy file name to clipboardExpand all lines: Documentation/Combine.md
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ let newPlayerCount = dbQueue.writePublisher { db -> Int in
191
191
192
192
The difference is that the last fetches are performed in the `thenRead` function. This function accepts two arguments: a readonly database connection, and the result of the `updates` function. This allows you to pass information from a function to the other (it is ignored in the sample code above).
193
193
194
-
When you use a [database pool], this method applies a scheduling optimization: the `thenRead` function sees the database in the state left by the `updates` function, and yet does not block any concurrent writes. This can reduce database write contention. See [Advanced DatabasePool](../README.md#advanced-databasepool) for more information.
194
+
When you use a [database pool], this method applies a scheduling optimization: the `thenRead` function sees the database in the state left by the `updates` function, and yet does not block any concurrent writes. This can reduce database write contention. See [Advanced DatabasePool](Concurrency.md#advanced-databasepool) for more information.
195
195
196
196
When you use a [database queue], the results are guaranteed to be identical, but no scheduling optimization is applied.
197
197
@@ -205,6 +205,7 @@ It completes on the main queue, unless you provide a specific [scheduler] to the
205
205
Database Observation publishers are based on [ValueObservation] and [DatabaseRegionObservation]. Please refer to their documentation for more information. If your application needs change notifications that are not built as Combine publishers, check the general [Database Changes Observation] chapter.
206
206
207
207
-[`ValueObservation.publisher(in:scheduling:)`]
208
+
-[`SharedValueObservation.publisher()`]
208
209
-[`DatabaseRegionObservation.publisher(in:)`]
209
210
210
211
@@ -250,6 +251,22 @@ This publisher has the same behavior as ValueObservation:
250
251
See [ValueObservation Scheduling](../README.md#valueobservation-scheduling) for more information.
251
252
252
253
254
+
#### `SharedValueObservation.publisher()`
255
+
256
+
[SharedValueObservation] tracks changes in database values. You can turn it into a Combine publisher:
257
+
258
+
```swift
259
+
let sharedObservation = ValueObservation
260
+
.tracking { db intry Player.fetchAll(db) }
261
+
.shared(in: dbQueue)
262
+
263
+
// A publisher with output [Player] and failure Error
264
+
let publisher = sharedObservation.publisher()
265
+
```
266
+
267
+
This publisher has the same behavior as SharedValueObservation.
268
+
269
+
253
270
#### `DatabaseRegionObservation.publisher(in:)`
254
271
255
272
[DatabaseRegionObservation] notifies all transactions that impact a tracked database region. You can turn it into a Combine publisher:
@@ -374,14 +391,16 @@ let cancellable = hallOfFamePublisher.sink(
0 commit comments