Skip to content

Commit 6850749

Browse files
committed
v5.21.0
1 parent f1a23ba commit 6850749

File tree

7 files changed

+32
-29
lines changed

7 files changed

+32
-29
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
77

88
#### 5.x Releases
99

10+
- `5.21.x` Releases - [5.21.0](#5210)
1011
- `5.20.x` Releases - [5.20.0](#5200)
1112
- `5.19.x` Releases - [5.19.0](#5190)
1213
- `5.18.x` Releases - [5.18.0](#5180)
@@ -87,7 +88,9 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
8788

8889
---
8990

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)
9194

9295
- **New**: [#1165](https://github.com/groue/GRDB.swift/pull/1165) by [@guidedways](https://github.com/guidedways): Support dynamic linking via Swift Package Manager
9396
- **Breaking Change**: [#1164](https://github.com/groue/GRDB.swift/pull/1164) by [@groue](https://github.com/groue): Drop experimental async apis from DatabaseMigrator

Documentation/FullTextSearch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
304304
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
305305
```
306306

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):
308308

309309
```swift
310310
let documents = try Document.fetchAll(db,
@@ -587,7 +587,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
587587
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
588588
```
589589

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):
591591

592592
```swift
593593
let documents = try Document.fetchAll(db,

Documentation/Migrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try dbQueue.read { db in
7777
}
7878
```
7979

80-
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.20/Structs/DatabaseMigrator.html) for more migrator methods.
80+
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.21/Structs/DatabaseMigrator.html) for more migrator methods.
8181

8282

8383
## The `eraseDatabaseOnSchemaChange` Option

GRDB.swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GRDB.swift'
3-
s.version = '5.20.0'
3+
s.version = '5.21.0'
44

55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,10 @@ ifdef JAZZY
529529
--author 'Gwendal Roué' \
530530
--author_url https://github.com/groue \
531531
--github_url https://github.com/groue/GRDB.swift \
532-
--github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.20.0 \
533-
--module-version 5.20.0 \
532+
--github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.21.0 \
533+
--module-version 5.21.0 \
534534
--module GRDB \
535-
--root-url http://groue.github.io/GRDB.swift/docs/5.20/ \
535+
--root-url http://groue.github.io/GRDB.swift/docs/5.21/ \
536536
--output Documentation/Reference \
537537
--xcodebuild-arguments -project,GRDB.xcodeproj,-scheme,GRDBiOS
538538
else

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
---
1313

14-
**Latest release**: February 1, 2022 • [version 5.20.0](https://github.com/groue/GRDB.swift/tree/v5.20.0)[CHANGELOG](CHANGELOG.md)[Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md)
14+
**Latest release**: February 6, 2022 • [version 5.21.0](https://github.com/groue/GRDB.swift/tree/v5.21.0)[CHANGELOG](CHANGELOG.md)[Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md)
1515

1616
**Requirements**: iOS 11.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ • SQLite 3.8.5+ • Swift 5.3+ / Xcode 12+
1717

1818
| Swift version | GRDB version |
1919
| -------------- | ----------------------------------------------------------- |
20-
| **Swift 5.3+** | **v5.20.0** |
20+
| **Swift 5.3+** | **v5.21.0** |
2121
| Swift 5.2 | [v5.12.0](https://github.com/groue/GRDB.swift/tree/v5.12.0) |
2222
| Swift 5.1 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) |
2323
| Swift 5 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) |
@@ -318,7 +318,7 @@ Documentation
318318

319319
#### Reference
320320

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))
322322

323323
#### Getting Started
324324

@@ -610,7 +610,7 @@ do {
610610
>
611611
> :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.
612612
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.
614614

615615

616616
SQLite API
@@ -667,7 +667,7 @@ try dbQueue.write { db in
667667
}
668668
```
669669

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.
671671

672672
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.
673673

@@ -925,7 +925,7 @@ try dbQueue.read { db in
925925
let dictionary = try Dictionary(uniqueKeysWithValues: cursor)
926926
```
927927

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`:
929929

930930
```swift
931931
// Prints all Github links
@@ -1004,7 +1004,7 @@ let rows = try Row.fetchAll(db,
10041004
arguments: ["name": "Arthur"])
10051005
```
10061006

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.
10081008

10091009
Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care:
10101010

@@ -1289,7 +1289,7 @@ GRDB ships with built-in support for the following value types:
12891289

12901290
- Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol.
12911291

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):
12931293

12941294
```swift
12951295
let url: URL = ...
@@ -1736,7 +1736,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
17361736
}
17371737
```
17381738

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:
17401740

17411741
```swift
17421742
// fatal error: A transaction has been left opened at the end of a database access
@@ -1848,7 +1848,7 @@ try dbQueue.write { db in
18481848
}
18491849
```
18501850

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).
18521852

18531853
```swift
18541854
insertStatement.arguments = ["name": "Arthur", "score": 1000]
@@ -1931,7 +1931,7 @@ See also `Database.execute(sql:)` in the [Executing Updates](#executing-updates)
19311931

19321932
> :point_up: **Note**: it is a programmer error to reuse a prepared statement that has failed: GRDB may crash if you do so.
19331933

1934-
For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/5.20/Classes/Statement.html).
1934+
For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/5.21/Classes/Statement.html).
19351935

19361936

19371937
### Prepared Statements Cache
@@ -2674,7 +2674,7 @@ try Place.fetchSet(db, sql: "SELECT ...", arguments:...) // Set<Place>
26742674
try Place.fetchOne(db, sql: "SELECT ...", arguments:...) // Place?
26752675
```
26762676

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.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.
26782678

26792679
> :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()`.
26802680

@@ -3114,7 +3114,7 @@ protocol EncodableRecord {
31143114
}
31153115
```
31163116

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.
31183118

31193119

31203120
### Date and UUID Coding Strategies
@@ -3136,7 +3136,7 @@ protocol EncodableRecord {
31363136
}
31373137
```
31383138

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.
31403140

31413141
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).
31423142

@@ -4661,7 +4661,7 @@ Player // SELECT * FROM player
46614661
```
46624662
46634663
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):
46654665
46664666
```swift
46674667
// SELECT DATE(creationDate), COUNT(*) FROM player WHERE name = 'Arthur' GROUP BY date(creationDate)
@@ -5567,7 +5567,7 @@ try Player.customRequest().fetchAll(db) // [Player]
55675567
55685568
- 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.
55695569
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.
55715571
55725572
55735573
## Joined Queries Support
@@ -6871,7 +6871,7 @@ DatabaseRegion helps [ValueObservation] and [DatabaseRegionObservation] track ch
68716871
68726872
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.
68736873
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).
68756875
68766876
68776877
#### The DatabaseRegionConvertible Protocol
@@ -8211,7 +8211,7 @@ When this is the case, there are two possible explanations:
82118211
try db.execute(sql: "UPDATE player SET name = ?", arguments: [name])
82128212
```
82138213
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).
82158215
82168216
82178217
@@ -8352,7 +8352,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots).
83528352
83538353
#### DatabaseWriter and DatabaseReader Protocols
83548354
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).
83568356
83578357
#### Asynchronous APIs
83588358
@@ -8405,7 +8405,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
84058405
[Sharing a Database]: Documentation/SharingADatabase.md
84068406
[FAQ]: #faq
84078407
[Database Observation]: #database-changes-observation
8408-
[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.20/Structs/SQLRequest.html
8408+
[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.21/Structs/SQLRequest.html
84098409
[SQL literal]: Documentation/SQLInterpolation.md#sql-literal
84108410
[Identifiable]: https://developer.apple.com/documentation/swift/identifiable
84118411
[Query Interface Organization]: Documentation/QueryInterfaceOrganization.md

Support/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>5.20.0</string>
18+
<string>5.21.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

0 commit comments

Comments
 (0)