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
@@ -89,9 +90,11 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
89
90
90
91
---
91
92
92
-
## Next Version
93
+
## 5.23.0
93
94
94
-
- **Breaking Change**: [#1200](https://github.com/groue/GRDB.swift/pull/1200) by [@groue](https://github.com/groue): Require Swift 5.6 Compiler for Concurrency Support
95
+
Released April 16, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v5.22.2...v5.23.0)
96
+
97
+
- **Breaking Change**: [#1200](https://github.com/groue/GRDB.swift/pull/1200) by [@groue](https://github.com/groue): Require Swift 5.6 Compiler for experimental Concurrency Support
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.22/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.23/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.22/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.23/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.22/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
321
+
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.23/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.22/Structs/Configuration.html) for more details and configuration options.
613
+
See [Configuration](http://groue.github.io/GRDB.swift/docs/5.23/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.22/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.23/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.22/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.23/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.22/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.23/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.22/Structs/StatementArguments.html):
1292
+
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.23/Structs/StatementArguments.html):
1293
1293
1294
1294
```swift
1295
1295
let url: URL =...
@@ -1760,7 +1760,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
1760
1760
}
1761
1761
```
1762
1762
1763
-
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.22/Structs/Configuration.html) configuration flag:
1763
+
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.23/Structs/Configuration.html) configuration flag:
1764
1764
1765
1765
```swift
1766
1766
// fatal error: A transaction has been left opened at the end of a database access
@@ -1872,7 +1872,7 @@ try dbQueue.write { db in
1872
1872
}
1873
1873
```
1874
1874
1875
-
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.22/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
1875
+
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.23/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.22/Structs/StatementArguments.html) for more information about the query arguments.
2701
+
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.23/Structs/StatementArguments.html) for more information about the query arguments.
2702
2702
2703
2703
>: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()`.
2704
2704
@@ -3138,7 +3138,7 @@ protocol EncodableRecord {
3138
3138
}
3139
3139
```
3140
3140
3141
-
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.22/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.22/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3141
+
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.23/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.23/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3142
3142
3143
3143
3144
3144
### Date and UUID Coding Strategies
@@ -3160,7 +3160,7 @@ protocol EncodableRecord {
3160
3160
}
3161
3161
```
3162
3162
3163
-
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.22/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.22/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.22/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3163
+
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.23/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.23/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.23/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3164
3164
3165
3165
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).
3166
3166
@@ -4685,7 +4685,7 @@ Player // SELECT * FROM player
4685
4685
```
4686
4686
4687
4687
4688
-
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.22/Structs/StatementArguments.html):
4688
+
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.23/Structs/StatementArguments.html):
4689
4689
4690
4690
```swift
4691
4691
// 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.
5593
5593
5594
-
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.22/Structs/AnyFetchRequest.html): a type-erased request.
5594
+
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.23/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.
6893
6893
6894
-
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.22/Structs/DatabaseRegion.html).
6894
+
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.23/Structs/DatabaseRegion.html).
6895
6895
6896
6896
6897
6897
#### The DatabaseRegionConvertible Protocol
@@ -8231,7 +8231,7 @@ When this is the case, there are two possible explanations:
8231
8231
try db.execute(sql: "UPDATE player SET name = ?", arguments: [name])
8232
8232
```
8233
8233
8234
-
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.22/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8234
+
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.23/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8235
8235
8236
8236
8237
8237
@@ -8372,7 +8372,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots).
8372
8372
8373
8373
#### DatabaseWriter and DatabaseReader Protocols
8374
8374
8375
-
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.22/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.22/Protocols/DatabaseWriter.html).
8375
+
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.23/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.23/Protocols/DatabaseWriter.html).
8376
8376
8377
8377
#### Asynchronous APIs
8378
8378
@@ -8425,7 +8425,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
8425
8425
[Sharing a Database]: Documentation/SharingADatabase.md
0 commit comments