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/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 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 diff --git a/README.md b/README.md index 3b3e53803..a5a40d8fc 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ CI Status

-**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+ @@ -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() 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 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\")") } }