diff --git a/Plugins/Libraries/LighterGeneration/RecordGeneration/GenerateDatabaseSupport.swift b/Plugins/Libraries/LighterGeneration/RecordGeneration/GenerateDatabaseSupport.swift index fa513b8..4860b5a 100644 --- a/Plugins/Libraries/LighterGeneration/RecordGeneration/GenerateDatabaseSupport.swift +++ b/Plugins/Libraries/LighterGeneration/RecordGeneration/GenerateDatabaseSupport.swift @@ -1,6 +1,6 @@ // // Created by Helge Heß. -// Copyright © 2022 ZeeZide GmbH. +// Copyright © 2022-2024 ZeeZide GmbH. // import LighterCodeGenAST @@ -194,7 +194,9 @@ extension EnlighterASTGenerator { func generateSQLError(name: String = "SQLError") -> Struct { return Struct( public: options.public, name: name, - conformances: [.name("Swift.Error"), .name("Equatable")], + conformances: [ + .name("Swift.Error"), .name("Equatable"), .name("Sendable") + ], variables: [ .let(public: options.public, "code" , .int32, comment: "The SQLite3 error code (`sqlite3_errcode`)."), diff --git a/Sources/Lighter/Utilities/SQLError.swift b/Sources/Lighter/Utilities/SQLError.swift index b550f0d..438ff74 100644 --- a/Sources/Lighter/Utilities/SQLError.swift +++ b/Sources/Lighter/Utilities/SQLError.swift @@ -1,6 +1,6 @@ // // Created by Helge Heß. -// Copyright © 2022-2023 ZeeZide GmbH. +// Copyright © 2022-2024 ZeeZide GmbH. // import func SQLite3.sqlite3_errcode @@ -50,3 +50,6 @@ public struct SQLError: Swift.Error, Equatable { self.message = sqlite3_errmsg(db).flatMap(String.init(cString:)) } } +#if swift(>=5.5) +extension SQLError: Sendable {} +#endif