From f72859b5b23c341d8db9edf4d237e74541607d4d Mon Sep 17 00:00:00 2001 From: naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Wed, 1 Jun 2022 01:30:32 +0000 Subject: [PATCH 01/10] chore: Included githubactions in the dependabot config This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure. Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com> --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From cd6960f5e9ff99c130e80eda4f28883fbd5447b5 Mon Sep 17 00:00:00 2001 From: Ethan Wong Date: Tue, 7 Jun 2022 11:35:37 +0800 Subject: [PATCH 02/10] Fix warnings of redundant conformance constraint on Xcode 14. --- GRDB/Fixit/GRDB-5.0.swift | 71 ++++++--------------------------------- 1 file changed, 11 insertions(+), 60 deletions(-) diff --git a/GRDB/Fixit/GRDB-5.0.swift b/GRDB/Fixit/GRDB-5.0.swift index e8ef6a721..e8f8f36ce 100644 --- a/GRDB/Fixit/GRDB-5.0.swift +++ b/GRDB/Fixit/GRDB-5.0.swift @@ -314,19 +314,14 @@ extension ValueObservation { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public func combine< - R1: _ValueReducer, - Combined>( + public func combine( _ other: ValueObservation, _ transform: @escaping (Reducer.Value, R1.Value) -> Combined) -> ValueObservation> { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public func combine< - R1: _ValueReducer, - R2: _ValueReducer, - Combined>( + public func combine( _ observation1: ValueObservation, _ observation2: ValueObservation, _ transform: @escaping (Reducer.Value, R1.Value, R2.Value) -> Combined) @@ -334,11 +329,7 @@ extension ValueObservation { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - Combined>( + public func combine( _ observation1: ValueObservation, _ observation2: ValueObservation, _ observation3: ValueObservation, @@ -347,12 +338,7 @@ extension ValueObservation { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer, - Combined>( + public func combine( _ observation1: ValueObservation, _ observation2: ValueObservation, _ observation3: ValueObservation, @@ -374,19 +360,14 @@ extension ValueObservation { extension ValueObservation where Reducer == ValueReducers.Auto { @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation) -> ValueObservation> { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation) @@ -394,11 +375,7 @@ extension ValueObservation where Reducer == ValueReducers.Auto { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation, @@ -407,12 +384,7 @@ extension ValueObservation where Reducer == ValueReducers.Auto { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer, - R5: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation, @@ -422,13 +394,7 @@ extension ValueObservation where Reducer == ValueReducers.Auto { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer, - R5: _ValueReducer, - R6: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation, @@ -439,14 +405,7 @@ extension ValueObservation where Reducer == ValueReducers.Auto { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer, - R5: _ValueReducer, - R6: _ValueReducer, - R7: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation, @@ -458,15 +417,7 @@ extension ValueObservation where Reducer == ValueReducers.Auto { { preconditionFailure() } @available(*, unavailable, message: "combine is no longer available. See the \"Migrating From GRDB 4 to GRDB 5\" guide.") - public static func combine< - R1: _ValueReducer, - R2: _ValueReducer, - R3: _ValueReducer, - R4: _ValueReducer, - R5: _ValueReducer, - R6: _ValueReducer, - R7: _ValueReducer, - R8: _ValueReducer>( + public static func combine( _ o1: ValueObservation, _ o2: ValueObservation, _ o3: ValueObservation, From a0212eb129843d070f001773edc0ce3f2fbad39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 7 Jun 2022 19:32:07 +0200 Subject: [PATCH 03/10] [skip ci] Early mention of the async accesses --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index aba88f03d..4b63256a0 100644 --- a/README.md +++ b/README.md @@ -491,6 +491,8 @@ let newPlaceCount = try dbQueue.write { db -> Int in } ``` +See the [Concurrency] guide for asynchronous database accesses. + **A database queue serializes accesses to the database**, which means that there is never more than one thread that uses the database. - When you don't need to modify the database, prefer the `read` method. It prevents any modification to the database. @@ -548,6 +550,8 @@ let newPlaceCount = try dbPool.write { db -> Int in } ``` +See the [Concurrency] guide for asynchronous database accesses. + **Database pools allow several threads to access the database at the same time:** - When you don't need to modify the database, prefer the `read` method, because several threads can perform reads in parallel. From c9f3a1e17fba1d23d064bd7842b69a5d36042d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 8 Jun 2022 08:12:30 +0200 Subject: [PATCH 04/10] CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b53fd52b6..37abca11f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,6 +91,12 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: --- +## Next Release + +- **New**: [#1226](https://github.com/groue/GRDB.swift/pull/1226) by [@naveensrinivasan](https://github.com/naveensrinivasan): Included githubactions in the dependabot config +- **New**: [#1228](https://github.com/groue/GRDB.swift/pull/1228) by [@naveensrinivasan](https://github.com/naveensrinivasan): Set permissions for GitHub actions +- **Fixed**: [#1233](https://github.com/groue/GRDB.swift/pull/1233) by [@GetToSet](https://github.com/GetToSet): Fix warnings of redundant conformance constraint on Xcode 14. + ## 5.24.1 Released May 26, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v5.24.0...v5.24.1) From 3f7adec072b017d2aa5ab8fee9f01e829463d45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 7 Jun 2022 19:27:12 +0200 Subject: [PATCH 05/10] Default qos is .userInitiated Addresses #1234 --- GRDB/Core/Configuration.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GRDB/Core/Configuration.swift b/GRDB/Core/Configuration.swift index bc996f453..0cf3c6200 100644 --- a/GRDB/Core/Configuration.swift +++ b/GRDB/Core/Configuration.swift @@ -245,8 +245,8 @@ public struct Configuration { /// /// The quality of service is ignored if you supply a target queue. /// - /// Default: .default - public var qos: DispatchQoS = .default + /// Default: .userInitiated + public var qos: DispatchQoS = .userInitiated /// The quality of service of read accesses var readQoS: DispatchQoS { From a289aecc3cd58bd161eed3dcf09eb71a65d3f11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 8 Jun 2022 08:13:12 +0200 Subject: [PATCH 06/10] CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37abca11f..50c487f8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: - **New**: [#1226](https://github.com/groue/GRDB.swift/pull/1226) by [@naveensrinivasan](https://github.com/naveensrinivasan): Included githubactions in the dependabot config - **New**: [#1228](https://github.com/groue/GRDB.swift/pull/1228) by [@naveensrinivasan](https://github.com/naveensrinivasan): Set permissions for GitHub actions +- **New**: [#1235](https://github.com/groue/GRDB.swift/pull/1235) by [@groue](https://github.com/groue): Raise default Quality of Service to `.userInitiated`. - **Fixed**: [#1233](https://github.com/groue/GRDB.swift/pull/1233) by [@GetToSet](https://github.com/GetToSet): Fix warnings of redundant conformance constraint on Xcode 14. ## 5.24.1 From 5e5b44aa7f0fbc98e90388f27d41135cc313bbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 11 Jun 2022 12:31:22 +0200 Subject: [PATCH 07/10] Fix Swiftlint build phase --- GRDB.xcodeproj/project.pbxproj | 3 +++ GRDBCustom.xcodeproj/project.pbxproj | 2 ++ 2 files changed, 5 insertions(+) diff --git a/GRDB.xcodeproj/project.pbxproj b/GRDB.xcodeproj/project.pbxproj index d0586f79c..e0d1d75e6 100755 --- a/GRDB.xcodeproj/project.pbxproj +++ b/GRDB.xcodeproj/project.pbxproj @@ -2874,6 +2874,7 @@ /* Begin PBXShellScriptBuildPhase section */ 56EB54F322C8ED5100850069 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -2892,6 +2893,7 @@ }; 56EB54FA22C9115E00850069 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -2910,6 +2912,7 @@ }; AAA4DCFA230F1E0600C74B15 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/GRDBCustom.xcodeproj/project.pbxproj b/GRDBCustom.xcodeproj/project.pbxproj index f93bf87f7..75519a27c 100755 --- a/GRDBCustom.xcodeproj/project.pbxproj +++ b/GRDBCustom.xcodeproj/project.pbxproj @@ -2231,6 +2231,7 @@ /* Begin PBXShellScriptBuildPhase section */ 56EB54FB22C9118600850069 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -2249,6 +2250,7 @@ }; 56EB54FD22C9119B00850069 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); From bf824bf68ca4c73acacb43d9f907272ad72d2b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 11 Jun 2022 12:31:35 +0200 Subject: [PATCH 08/10] Makefile: support for Xcode 14.0 --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1b3535555..a37d9ce94 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,16 @@ TEST_ACTIONS = clean build build-for-testing test-without-building # When adding support for an Xcode version, look for available devices with # `xcrun xctrace list devices` (or the deprecated `instruments -s devices`). -ifeq ($(XCODEVERSION),13.4) +ifeq ($(XCODEVERSION),14.0) + MAX_SWIFT_VERSION = 5.7 + MIN_SWIFT_VERSION = 5.3 + MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 13,OS=16.0" + MIN_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 8,OS=12.4" + MAX_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV,OS=16.0" + #MIN_TVOS_DESTINATION = "platform=tvOS Simulator,name=Apple TV,OS=11.4" TODO: restore + OTHER_SWIFT_FLAGS = '$$(inherited) -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK -Xfrontend -warn-concurrency -Xfrontend -enable-actor-data-race-checks' + GCC_PREPROCESSOR_DEFINITIONS = '$$(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1' +else ifeq ($(XCODEVERSION),13.4) MAX_SWIFT_VERSION = 5.6 MIN_SWIFT_VERSION = 5.3 MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 13,OS=15.5" From d1cba5e5c839362d0da49d83f798d5d7475081ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 11 Jun 2022 17:22:00 +0200 Subject: [PATCH 09/10] TODO --- TODO.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TODO.md b/TODO.md index c99c11504..12b64e2a9 100644 --- a/TODO.md +++ b/TODO.md @@ -23,6 +23,11 @@ - [ ] Property wrapper that decodes dictionaries (but how to tell the key column?) - [X] See if SQLITE_FCNTL_DATA_VERSION could help working around the lack of snapshots in order to avoid double initial fetch of ValueObservation. Result: no, it does not look it returns values that are comparable between two distinct SQLite connections (from the initial reader, and from the writer thhat starts the observation) - [ ] Grab all FTS tokens in a string +- [ ] GRDB 6: Swift 5.7 +- [ ] GRDB 6: any / some +- [ ] GRDB 6: primary associated types (cursor, requests, ...) +- [ ] GRDB 6: remove existential/generic duplicated methods +- [ ] GRDB 6: remove useless AnyXXX Type erasers - [ ] GRDB 6: decoding errors - [ ] GRDB 6: conflict resolution in persistence methods - [ ] GRDB 6: UPSERT From c0e9c8746d789447d0ebe46a5c0632397e704201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 11 Jun 2022 12:25:46 +0200 Subject: [PATCH 10/10] v5.25.0 --- CHANGELOG.md | 5 ++++- Documentation/FullTextSearch.md | 4 ++-- Documentation/Migrations.md | 2 +- GRDB.swift.podspec | 2 +- Makefile | 6 ++--- README.md | 40 ++++++++++++++++----------------- Support/Info.plist | 2 +- 7 files changed, 32 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c487f8c..9fbbca5cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: #### 5.x Releases +- `5.25.x` Releases - [5.25.0](#5250) - `5.24.x` Releases - [5.24.0](#5240) | [5.24.1](#5241) - `5.23.x` Releases - [5.23.0](#5230) - `5.22.x` Releases - [5.22.0](#5220) | [5.22.1](#5221) | [5.22.2](#5222) @@ -91,7 +92,9 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception: --- -## Next Release +## 5.25.0 + +Released June 11, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v5.24.1...v5.25.0) - **New**: [#1226](https://github.com/groue/GRDB.swift/pull/1226) by [@naveensrinivasan](https://github.com/naveensrinivasan): Included githubactions in the dependabot config - **New**: [#1228](https://github.com/groue/GRDB.swift/pull/1228) by [@naveensrinivasan](https://github.com/naveensrinivasan): Set permissions for GitHub actions diff --git a/Documentation/FullTextSearch.md b/Documentation/FullTextSearch.md index 061a39433..f13f64737 100644 --- a/Documentation/FullTextSearch.md +++ b/Documentation/FullTextSearch.md @@ -304,7 +304,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil ``` -FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.24/Structs/StatementArguments.html): +FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.25/Structs/StatementArguments.html): ```swift let documents = try Document.fetchAll(db, @@ -587,7 +587,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil ``` -FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.24/Structs/StatementArguments.html): +FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/5.25/Structs/StatementArguments.html): ```swift let documents = try Document.fetchAll(db, diff --git a/Documentation/Migrations.md b/Documentation/Migrations.md index 861035a10..f1040a9f1 100644 --- a/Documentation/Migrations.md +++ b/Documentation/Migrations.md @@ -77,7 +77,7 @@ try dbQueue.read { db in } ``` -See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.24/Structs/DatabaseMigrator.html) for more migrator methods. +See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/5.25/Structs/DatabaseMigrator.html) for more migrator methods. ## The `eraseDatabaseOnSchemaChange` Option diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index a8549b775..e54a9e4f7 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GRDB.swift' - s.version = '5.24.1' + s.version = '5.25.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A toolkit for SQLite databases, with a focus on application development.' diff --git a/Makefile b/Makefile index a37d9ce94..6937997b5 100644 --- a/Makefile +++ b/Makefile @@ -586,10 +586,10 @@ ifdef JAZZY --author 'Gwendal Roué' \ --author_url https://github.com/groue \ --github_url https://github.com/groue/GRDB.swift \ - --github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.24.1 \ - --module-version 5.24.1 \ + --github-file-prefix https://github.com/groue/GRDB.swift/tree/v5.25.0 \ + --module-version 5.25.0 \ --module GRDB \ - --root-url http://groue.github.io/GRDB.swift/docs/5.24/ \ + --root-url http://groue.github.io/GRDB.swift/docs/5.25/ \ --output Documentation/Reference \ --xcodebuild-arguments -project,GRDB.xcodeproj,-scheme,GRDBiOS else diff --git a/README.md b/README.md index 4b63256a0..7a4df3e90 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ --- -**Latest release**: May 26, 2022 • [version 5.24.1](https://github.com/groue/GRDB.swift/tree/v5.24.1) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md) +**Latest release**: June 11, 2022 • [version 5.25.0](https://github.com/groue/GRDB.swift/tree/v5.25.0) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 4 to GRDB 5](Documentation/GRDB5MigrationGuide.md) **Requirements**: iOS 11.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ • SQLite 3.8.5+ • Swift 5.3+ / Xcode 12+ | Swift version | GRDB version | | -------------- | ----------------------------------------------------------- | -| **Swift 5.3+** | **v5.24.1** | +| **Swift 5.3+** | **v5.25.0** | | Swift 5.2 | [v5.12.0](https://github.com/groue/GRDB.swift/tree/v5.12.0) | | Swift 5.1 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) | | Swift 5 | [v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0) | @@ -321,7 +321,7 @@ Documentation #### Reference -- [GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.24/index.html) (generated by [Jazzy](https://github.com/realm/jazzy)) +- [GRDB Reference](http://groue.github.io/GRDB.swift/docs/5.25/index.html) (generated by [Jazzy](https://github.com/realm/jazzy)) #### Getting Started @@ -617,7 +617,7 @@ do { > > :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. -See [Configuration](http://groue.github.io/GRDB.swift/docs/5.24/Structs/Configuration.html) for more details and configuration options. +See [Configuration](http://groue.github.io/GRDB.swift/docs/5.25/Structs/Configuration.html) for more details and configuration options. SQLite API @@ -674,7 +674,7 @@ try dbQueue.write { db in } ``` -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.24/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. +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.25/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. 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. @@ -932,7 +932,7 @@ try dbQueue.read { db in let dictionary = try Dictionary(uniqueKeysWithValues: cursor) ``` -- **Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.24/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`: +- **Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/5.25/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`: ```swift // Prints all Github links @@ -1011,7 +1011,7 @@ let rows = try Row.fetchAll(db, arguments: ["name": "Arthur"]) ``` -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.24/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. +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.25/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments. Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care: @@ -1296,7 +1296,7 @@ GRDB ships with built-in support for the following value types: - Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol. -Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.24/Structs/StatementArguments.html): +Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/5.25/Structs/StatementArguments.html): ```swift let url: URL = ... @@ -1767,7 +1767,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction } ``` -Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.24/Structs/Configuration.html) configuration flag: +Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/5.25/Structs/Configuration.html) configuration flag: ```swift // fatal error: A transaction has been left opened at the end of a database access @@ -1879,7 +1879,7 @@ try dbQueue.write { db in } ``` -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.24/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols). +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.25/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols). ```swift insertStatement.arguments = ["name": "Arthur", "score": 1000] @@ -1962,7 +1962,7 @@ See also `Database.execute(sql:)` in the [Executing Updates](#executing-updates) > :point_up: **Note**: it is a programmer error to reuse a prepared statement that has failed: GRDB may crash if you do so. -For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/5.24/Classes/Statement.html). +For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/5.25/Classes/Statement.html). ### Prepared Statements Cache @@ -2705,7 +2705,7 @@ try Place.fetchSet(db, sql: "SELECT ...", arguments:...) // Set try Place.fetchOne(db, sql: "SELECT ...", arguments:...) // Place? ``` -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.24/Structs/StatementArguments.html) for more information about the query arguments. +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.25/Structs/StatementArguments.html) for more information about the query arguments. > :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()`. @@ -3145,7 +3145,7 @@ protocol EncodableRecord { } ``` -See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.24/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.24/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies. +See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.25/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.25/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies. ### Date and UUID Coding Strategies @@ -3167,7 +3167,7 @@ protocol EncodableRecord { } ``` -See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.24/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.24/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.24/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies. +See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/5.25/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.25/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/5.25/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies. 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). @@ -4692,7 +4692,7 @@ Player // SELECT * FROM player ``` -Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.24/Structs/StatementArguments.html): +Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/5.25/Structs/StatementArguments.html): ```swift // SELECT DATE(creationDate), COUNT(*) FROM player WHERE name = 'Arthur' GROUP BY date(creationDate) @@ -5598,7 +5598,7 @@ try Player.customRequest().fetchAll(db) // [Player] - 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. -- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.24/Structs/AnyFetchRequest.html): a type-erased request. +- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/5.25/Structs/AnyFetchRequest.html): a type-erased request. ## Joined Queries Support @@ -6900,7 +6900,7 @@ DatabaseRegion helps [ValueObservation] and [DatabaseRegionObservation] track ch 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. -For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.24/Structs/DatabaseRegion.html). +For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/5.25/Structs/DatabaseRegion.html). #### The DatabaseRegionConvertible Protocol @@ -8240,7 +8240,7 @@ When this is the case, there are two possible explanations: try db.execute(sql: "UPDATE player SET name = ?", arguments: [name]) ``` -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.24/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp). +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.25/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp). @@ -8381,7 +8381,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots). #### DatabaseWriter and DatabaseReader Protocols -This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.24/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.24/Protocols/DatabaseWriter.html). +This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/5.25/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/5.25/Protocols/DatabaseWriter.html). #### Asynchronous APIs @@ -8434,7 +8434,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests]. [Sharing a Database]: Documentation/SharingADatabase.md [FAQ]: #faq [Database Observation]: #database-changes-observation -[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.24/Structs/SQLRequest.html +[SQLRequest]: http://groue.github.io/GRDB.swift/docs/5.25/Structs/SQLRequest.html [SQL literal]: Documentation/SQLInterpolation.md#sql-literal [Identifiable]: https://developer.apple.com/documentation/swift/identifiable [Query Interface Organization]: Documentation/QueryInterfaceOrganization.md diff --git a/Support/Info.plist b/Support/Info.plist index e189c76a4..18a20af16 100644 --- a/Support/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.24.1 + 5.25.0 CFBundleSignature ???? CFBundleVersion