From f44134154331a64b373c5ee4f45fbeb25dcc69ce Mon Sep 17 00:00:00 2001
From: "Ming C."
Date: Sat, 17 Aug 2024 11:43:05 -0700
Subject: [PATCH 1/5] README.md: Fix sample code
---
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 3b3e53803..be3c783ff 100644
--- a/README.md
+++ b/README.md
@@ -5743,9 +5743,7 @@ Open a read-only connection to your resource:
// HOW TO open a read-only connection to a database resource
// Get the path to the database resource.
-if let dbPath = Bundle.main.path(forResource: "db", ofType: "sqlite")
-
-if let dbPath {
+if let dbPath = Bundle.main.path(forResource: "db", ofType: "sqlite") {
// If the resource exists, open a read-only connection.
// Writes are disallowed because resources can not be modified.
var config = Configuration()
From fcfdab2f11df7dd08e77bcd769ece6cb9f1261e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gwendal=20Roue=CC=81?=
Date: Thu, 22 Aug 2024 08:17:04 +0200
Subject: [PATCH 2/5] Import string_h for strcmp
Thanks to @karianneberg in https://github.com/groue/GRDB.swift/commit/344878cdb2e3af07f46954e3bc2b93541489bd82
---
GRDB/Core/StatementAuthorizer.swift | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/GRDB/Core/StatementAuthorizer.swift b/GRDB/Core/StatementAuthorizer.swift
index 42691dbed..54d905778 100644
--- a/GRDB/Core/StatementAuthorizer.swift
+++ b/GRDB/Core/StatementAuthorizer.swift
@@ -1,8 +1,8 @@
-#if os(Linux)
+#if canImport(string_h)
+import string_h
+#elseif os(Linux)
import Glibc
-#endif
-
-#if canImport(Darwin)
+#elseif os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
import Darwin
#endif
From d3d2a9c4f73cb4478385b7f164d5ac40dd9b70a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gwendal=20Roue=CC=81?=
Date: Sat, 24 Aug 2024 10:26:34 +0200
Subject: [PATCH 3/5] Stop testing error messages that depend on the SQLite
version
---
Tests/GRDBTests/DatabaseConfigurationTests.swift | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Tests/GRDBTests/DatabaseConfigurationTests.swift b/Tests/GRDBTests/DatabaseConfigurationTests.swift
index 7ff0f4702..88fdb622b 100644
--- a/Tests/GRDBTests/DatabaseConfigurationTests.swift
+++ b/Tests/GRDBTests/DatabaseConfigurationTests.swift
@@ -137,7 +137,6 @@ class DatabaseConfigurationTests: GRDBTestCase {
}
} catch let error as DatabaseError {
XCTAssertEqual(error.resultCode, .SQLITE_ERROR)
- XCTAssertEqual(error.message, "no such column: foo")
XCTAssertEqual(error.sql, "SELECT \"foo\" FROM player")
}
@@ -151,10 +150,6 @@ class DatabaseConfigurationTests: GRDBTestCase {
}
} catch let error as DatabaseError {
XCTAssertEqual(error.resultCode, .SQLITE_ERROR)
- XCTAssert([
- "no such column: foo",
- "table player has no column named foo"]
- .contains(error.message))
XCTAssertEqual(error.sql, "CREATE INDEX i ON player(\"foo\")")
}
}
From c64bc11627703977ef3d02ab8105fa192312d8e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gwendal=20Roue=CC=81?=
Date: Sat, 10 Feb 2024 17:15:52 +0100
Subject: [PATCH 4/5] Remove ill-advised TODO
This would force users to force-unwrap their custom `ColumnType(rawValue: "WHATEVER")!`
---
GRDB/Core/Database.swift | 3 ---
1 file changed, 3 deletions(-)
diff --git a/GRDB/Core/Database.swift b/GRDB/Core/Database.swift
index 6281109b3..474373db5 100644
--- a/GRDB/Core/Database.swift
+++ b/GRDB/Core/Database.swift
@@ -124,8 +124,6 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib
// MARK: - SQLite C API
- // TODO: make it non optional, since one can't get a `Database` instance
- // after `close()`.
/// The raw SQLite connection, suitable for the SQLite C API.
///
/// The result is nil after the database has been successfully closed with
@@ -1923,7 +1921,6 @@ extension Database {
/// The SQL for the column type (`"TEXT"`, `"BLOB"`, etc.)
public let rawValue: String
- // TODO: GRDB7 make it an failable initializer that returns nil when rawValue is empty (or blank).
/// Creates an SQL column type.
public init(rawValue: String) {
self.rawValue = rawValue
From ae837a3a442b35dcf6a110f1487ccce13fdb43a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gwendal=20Roue=CC=81?=
Date: Sat, 24 Aug 2024 11:46:45 +0200
Subject: [PATCH 5/5] v6.29.2
---
CHANGELOG.md | 8 +++++++-
GRDB.swift.podspec | 2 +-
README.md | 2 +-
Support/Info.plist | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 39fe55e5e..bfb838235 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
#### 6.x Releases
-- `6.29.x` Releases - [6.29.0](#6290) - [6.29.1](#6291)
+- `6.29.x` Releases - [6.29.0](#6290) - [6.29.1](#6291) - [6.29.2](#6292)
- `6.28.x` Releases - [6.28.0](#6280)
- `6.27.x` Releases - [6.27.0](#6270)
- `6.26.x` Releases - [6.26.0](#6260)
@@ -127,6 +127,12 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
---
+## 6.29.2
+
+Released August 24, 2024
+
+- **New**: [#1593](https://github.com/groue/GRDB.swift/pull/1593) by [@mingchen](https://github.com/mingchen): Fix sample code in README
+
## 6.29.1
Released August 7, 2024
diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec
index 93b9790ef..403fd74f9 100644
--- a/GRDB.swift.podspec
+++ b/GRDB.swift.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'GRDB.swift'
- s.version = '6.29.1'
+ s.version = '6.29.2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'
diff --git a/README.md b/README.md
index be3c783ff..a5a40d8fc 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
-**Latest release**: August 7, 2024 • [version 6.29.1](https://github.com/groue/GRDB.swift/tree/v6.29.1) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md)
+**Latest release**: August 24, 2024 • [version 6.29.2](https://github.com/groue/GRDB.swift/tree/v6.29.2) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md)
**Requirements**: iOS 11.0+ / macOS 10.13+ / tvOS 11.0+ / watchOS 4.0+ • SQLite 3.19.3+ • Swift 5.7+ / Xcode 14+
diff --git a/Support/Info.plist b/Support/Info.plist
index 5ef52833c..08f23569d 100644
--- a/Support/Info.plist
+++ b/Support/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 6.29.1
+ 6.29.2
CFBundleSignature
????
CFBundleVersion