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
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
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.21.x` Releases - [5.21.0](#5210)
10
11
- `5.20.x` Releases - [5.20.0](#5200)
11
12
- `5.19.x` Releases - [5.19.0](#5190)
12
13
- `5.18.x` Releases - [5.18.0](#5180)
@@ -87,7 +88,9 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
87
88
88
89
---
89
90
90
-
## Next Release
91
+
## 5.21.0
92
+
93
+
Released February 6, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v5.20.0...v5.21.0)
91
94
92
95
- **New**: [#1165](https://github.com/groue/GRDB.swift/pull/1165) by [@guidedways](https://github.com/guidedways): Support dynamic linking via Swift Package Manager
93
96
- **Breaking Change**: [#1164](https://github.com/groue/GRDB.swift/pull/1164) by [@groue](https://github.com/groue): Drop experimental async apis from DatabaseMigrator
let pattern =FTS3Pattern(matchingAnyTokenIn: "*") // nil
305
305
```
306
306
307
-
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html):
307
+
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html):
let pattern =FTS5Pattern(matchingAnyTokenIn: "*") // nil
588
588
```
589
589
590
-
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html):
590
+
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html):
| Swift 5.2 |[v5.12.0](https://github.com/groue/GRDB.swift/tree/v5.12.0)|
22
22
| Swift 5.1 |[v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)|
23
23
| Swift 5 |[v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)|
@@ -318,7 +318,7 @@ Documentation
318
318
319
319
#### Reference
320
320
321
-
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.20/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
321
+
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.21/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
322
322
323
323
#### Getting Started
324
324
@@ -610,7 +610,7 @@ do {
610
610
>
611
611
> :warning:**Warning**: The SQLite version that ships with old operating systems (prior to OSX 10.12, tvOS 10.0, and watchOS 3.0) outputs statement arguments in the [trace events](#how-do-i-print-a-request-as-sql), regardless of the `publicStatementArguments` flag.
612
612
613
-
See [Configuration](http://groue.github.io/GRDB.swift/docs/5.20/Structs/Configuration.html) for more details and configuration options.
613
+
See [Configuration](http://groue.github.io/GRDB.swift/docs/5.21/Structs/Configuration.html) for more details and configuration options.
614
614
615
615
616
616
SQLite API
@@ -667,7 +667,7 @@ try dbQueue.write { db in
667
667
}
668
668
```
669
669
670
-
The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
670
+
The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
671
671
672
672
You can also embed query arguments right into your SQL queries, with the `literal` argument label, as in the example below. See [SQL Interpolation] for more details.
673
673
@@ -925,7 +925,7 @@ try dbQueue.read { db in
925
925
let dictionary =tryDictionary(uniqueKeysWithValues: cursor)
926
926
```
927
927
928
-
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.20/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`:
928
+
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.21/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`:
929
929
930
930
```swift
931
931
// Prints all Github links
@@ -1004,7 +1004,7 @@ let rows = try Row.fetchAll(db,
1004
1004
arguments: ["name":"Arthur"])
1005
1005
```
1006
1006
1007
-
See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
1007
+
See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
1008
1008
1009
1009
Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care:
1010
1010
@@ -1289,7 +1289,7 @@ GRDB ships with built-in support for the following value types:
1289
1289
1290
1290
- Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol.
1291
1291
1292
-
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html):
1292
+
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html):
1293
1293
1294
1294
```swift
1295
1295
let url: URL =...
@@ -1736,7 +1736,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
1736
1736
}
1737
1737
```
1738
1738
1739
-
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.20/Structs/Configuration.html) configuration flag:
1739
+
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.21/Structs/Configuration.html) configuration flag:
1740
1740
1741
1741
```swift
1742
1742
// fatal error: A transaction has been left opened at the end of a database access
@@ -1848,7 +1848,7 @@ try dbQueue.write { db in
1848
1848
}
1849
1849
```
1850
1850
1851
-
The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
1851
+
The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html) for more information about the query arguments.
2677
+
See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html) for more information about the query arguments.
2678
2678
2679
2679
>:point_up:**Note**:for performance reasons, the same row argument to `init(row:)` is reused during the iteration of a fetch query. If you want to keep the row for later use, make sure to store a copy: `self.row = row.copy()`.
2680
2680
@@ -3114,7 +3114,7 @@ protocol EncodableRecord {
3114
3114
}
3115
3115
```
3116
3116
3117
-
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.20/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.20/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3117
+
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.21/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.21/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3118
3118
3119
3119
3120
3120
### Date and UUID Coding Strategies
@@ -3136,7 +3136,7 @@ protocol EncodableRecord {
3136
3136
}
3137
3137
```
3138
3138
3139
-
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.20/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.20/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.20/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3139
+
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.21/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.21/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.21/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3140
3140
3141
3141
There is no customization of uuid decoding, because UUID can already decode all its encoded variants (16-bytes blobs and uuid strings, both uppercase and lowercase).
3142
3142
@@ -4661,7 +4661,7 @@ Player // SELECT * FROM player
4661
4661
```
4662
4662
4663
4663
4664
-
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.20/Structs/StatementArguments.html):
4664
+
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.21/Structs/StatementArguments.html):
4665
4665
4666
4666
```swift
4667
4667
// SELECT DATE(creationDate), COUNT(*) FROM player WHERE name = 'Arthur' GROUP BY date(creationDate)
- The `adapted(_:)` method eases the consumption of complex rows with [row adapters](#row-adapters). See [Joined Queries Support](#joined-queries-support) for some sample code that uses this method.
5569
5569
5570
-
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.20/Structs/AnyFetchRequest.html): a type-erased request.
5570
+
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.21/Structs/AnyFetchRequest.html): a type-erased request.
For example, if you observe the region of `Player.select(max(Column("score")))`, then you'll get be notified of all changes performed on the `score` column of the `player` table (updates, insertions and deletions), even if they do not modify the value of the maximum score. However, you will not get any notification for changes performed on other database tables, or updates to other columns of the player table.
6873
6873
6874
-
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.20/Structs/DatabaseRegion.html).
6874
+
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.21/Structs/DatabaseRegion.html).
6875
6875
6876
6876
6877
6877
#### The DatabaseRegionConvertible Protocol
@@ -8211,7 +8211,7 @@ When this is the case, there are two possible explanations:
8211
8211
try db.execute(sql: "UPDATE player SET name = ?", arguments: [name])
8212
8212
```
8213
8213
8214
-
For more information, see [Double-quoted String Literals Are Accepted](https://sqlite.org/quirks.html#dblquote), and [Configuration.acceptsDoubleQuotedStringLiterals](http://groue.github.io/GRDB.swift/docs/5.20/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8214
+
For more information, see [Double-quoted String Literals Are Accepted](https://sqlite.org/quirks.html#dblquote), and [Configuration.acceptsDoubleQuotedStringLiterals](http://groue.github.io/GRDB.swift/docs/5.21/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8215
8215
8216
8216
8217
8217
@@ -8352,7 +8352,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots).
8352
8352
8353
8353
#### DatabaseWriter and DatabaseReader Protocols
8354
8354
8355
-
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.20/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.20/Protocols/DatabaseWriter.html).
8355
+
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.21/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.21/Protocols/DatabaseWriter.html).
8356
8356
8357
8357
#### Asynchronous APIs
8358
8358
@@ -8405,7 +8405,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
8405
8405
[Sharing a Database]: Documentation/SharingADatabase.md
0 commit comments