diff --git a/CryptomatorCloudAccess.xcodeproj/project.pbxproj b/CryptomatorCloudAccess.xcodeproj/project.pbxproj index bcbce32..635e9e4 100644 --- a/CryptomatorCloudAccess.xcodeproj/project.pbxproj +++ b/CryptomatorCloudAccess.xcodeproj/project.pbxproj @@ -1877,7 +1877,7 @@ repositoryURL = "https://github.com/groue/GRDB.swift.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 5.26.0; + minimumVersion = 6.29.1; }; }; 74F93565251F6863001F4ADA /* XCRemoteSwiftPackageReference "promises" */ = { diff --git a/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9076027..6823916 100644 --- a/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -78,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "dd7e7f39e8e4d7a22d258d9809a882f914690b01", - "version" : "5.26.1" + "revision" : "2cf6c756e1e5ef6901ebae16576a7e4e4b834622", + "version" : "6.29.3" } }, { diff --git a/Package.resolved b/Package.resolved index 0622fed..b5062ad 100644 --- a/Package.resolved +++ b/Package.resolved @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "dd7e7f39e8e4d7a22d258d9809a882f914690b01", - "version" : "5.26.1" + "revision" : "2cf6c756e1e5ef6901ebae16576a7e4e4b834622", + "version" : "6.29.3" } }, { diff --git a/Package.swift b/Package.swift index 75344f4..cb4212c 100644 --- a/Package.swift +++ b/Package.swift @@ -36,7 +36,7 @@ let package = Package( .package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "4.0.0")), .package(url: "https://github.com/google/gtm-session-fetcher.git", .upToNextMinor(from: "3.1.0")), .package(url: "https://github.com/google/promises.git", .upToNextMinor(from: "2.3.0")), - .package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "5.26.0")), + .package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "6.29.1")), .package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "1.6.0")), .package(url: "https://github.com/pCloud/pcloud-sdk-swift.git", .upToNextMinor(from: "3.2.0")), .package(url: "https://github.com/phil1995/dropbox-sdk-obj-c-spm.git", .upToNextMinor(from: "7.2.0")), diff --git a/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift b/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift index 05e9b10..7108a9e 100644 --- a/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift @@ -13,7 +13,7 @@ class BoxIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: BoxItem.databaseTableName) { table in table.column(BoxItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Box/BoxItem.swift b/Sources/CryptomatorCloudAccess/Box/BoxItem.swift index 181d364..0aa4c0e 100644 --- a/Sources/CryptomatorCloudAccess/Box/BoxItem.swift +++ b/Sources/CryptomatorCloudAccess/Box/BoxItem.swift @@ -36,7 +36,7 @@ extension BoxItem { } extension BoxItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[BoxItem.cloudPathKey] = cloudPath container[BoxItem.identifierKey] = identifier container[BoxItem.itemTypeKey] = itemType diff --git a/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift b/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift index 5c77f33..780b981 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift @@ -19,7 +19,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.cleartextPathKey] = cleartextPath container[CachedEntry.dirIdKey] = dirId } @@ -29,7 +29,7 @@ class DirectoryIdCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.cleartextPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift index 66544b5..870b1bd 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift @@ -25,7 +25,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.shortenedNameKey] = shortenedName container[CachedEntry.originalNameKey] = originalName } @@ -48,7 +48,7 @@ class VaultFormat6ShortenedNameCache { init(vaultPath: CloudPath) throws { self.vaultPath = vaultPath self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4 - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift index a0ce300..a50b718 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift @@ -31,7 +31,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.shortenedNameKey] = shortenedName container[CachedEntry.originalNameKey] = originalName } @@ -106,7 +106,7 @@ class VaultFormat7ShortenedNameCache { self.vaultPath = vaultPath self.threshold = threshold self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4 - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift index 97b5b93..f5f59f1 100644 --- a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift @@ -13,7 +13,7 @@ class GoogleDriveIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: GoogleDriveItem.databaseTableName) { table in table.column(GoogleDriveItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift index da53e2b..4c32d94 100644 --- a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift @@ -13,7 +13,7 @@ class OneDriveIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: OneDriveItem.databaseTableName) { table in table.column(OneDriveItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift index 4973a83..10e6ade 100644 --- a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift +++ b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift @@ -42,7 +42,7 @@ struct OneDriveItem: Decodable, FetchableRecord, TableRecord, Equatable { } extension OneDriveItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[OneDriveItem.cloudPathKey] = cloudPath container[OneDriveItem.identifierKey] = identifier container[OneDriveItem.driveIdentifierKey] = driveIdentifier diff --git a/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift b/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift index ece7571..57cd000 100644 --- a/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift @@ -14,7 +14,7 @@ class PCloudIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: PCloudItem.databaseTableName) { table in table.column(PCloudItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift b/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift index 2b15d93..daa6ec0 100644 --- a/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift +++ b/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift @@ -46,7 +46,7 @@ extension PCloudItem { } extension PCloudItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[PCloudItem.cloudPathKey] = cloudPath container[PCloudItem.identifierKey] = identifier container[PCloudItem.itemTypeKey] = itemType diff --git a/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift b/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift index 1729e19..28235c0 100644 --- a/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift +++ b/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift @@ -29,7 +29,7 @@ class DirectoryContentCacheTests: XCTestCase { let subfolderPath = CloudPath("/subfolder") override func setUpWithError() throws { - let inMemoryDB = DatabaseQueue() + let inMemoryDB = try DatabaseQueue() cache = try DirectoryContentDBCache(dbWriter: inMemoryDB, maxPageSize: maxPageSize) }