Add helper itemMetadataLogString static func for logging in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-03-14 14:40:34 +01:00
parent 2ca2609e0c
commit b532b96937
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -74,6 +74,10 @@ class NextcloudFilesDatabaseManager : NSObject {
return realm return realm
} }
private static func itemMetadataLogString(_ metadata: NextcloudItemMetadataTable) -> String {
return "ocID: \(metadata.ocId), etag: \(metadata.etag), fileName: \(metadata.fileName)"
}
func anyItemMetadatasForAccount(_ account: String) -> Bool { func anyItemMetadatasForAccount(_ account: String) -> Bool {
return !ncDatabase().objects(NextcloudItemMetadataTable.self).filter("account == %@", account).isEmpty return !ncDatabase().objects(NextcloudItemMetadataTable.self).filter("account == %@", account).isEmpty
} }