mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix lint issues.
This commit is contained in:
@@ -9,12 +9,12 @@ let package = Package(
|
||||
.library(
|
||||
name: "SyncDatabase",
|
||||
type: .dynamic,
|
||||
targets: ["SyncDatabase"]),
|
||||
targets: ["SyncDatabase"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(path: "../RSCore"),
|
||||
.package(path: "../Articles"),
|
||||
.package(path: "../RSDatabase"),
|
||||
.package(path: "../RSDatabase")
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
@@ -22,9 +22,9 @@ let package = Package(
|
||||
dependencies: [
|
||||
"RSCore",
|
||||
"RSDatabase",
|
||||
"Articles",
|
||||
"Articles"
|
||||
],
|
||||
swiftSettings: [.unsafeFlags(["-warnings-as-errors"])]
|
||||
),
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ import Foundation
|
||||
import RSCore
|
||||
import RSDatabase
|
||||
|
||||
public typealias SyncStatusesResult = Result<Array<SyncStatus>, DatabaseError>
|
||||
public typealias SyncStatusesResult = Result<[SyncStatus], DatabaseError>
|
||||
public typealias SyncStatusesCompletionBlock = (SyncStatusesResult) -> Void
|
||||
|
||||
public typealias SyncStatusArticleIDsResult = Result<Set<String>, DatabaseError>
|
||||
@@ -35,7 +35,7 @@ public struct SyncDatabase {
|
||||
public func insertStatuses(_ statuses: [SyncStatus], completion: @escaping DatabaseCompletionBlock) {
|
||||
syncStatusTable.insertStatuses(statuses, completion: completion)
|
||||
}
|
||||
|
||||
|
||||
public func selectForProcessing(limit: Int? = nil, completion: @escaping SyncStatusesCompletionBlock) {
|
||||
return syncStatusTable.selectForProcessing(limit: limit, completion: completion)
|
||||
}
|
||||
@@ -47,11 +47,11 @@ public struct SyncDatabase {
|
||||
public func selectPendingReadStatusArticleIDs(completion: @escaping SyncStatusArticleIDsCompletionBlock) {
|
||||
syncStatusTable.selectPendingReadStatusArticleIDs(completion: completion)
|
||||
}
|
||||
|
||||
|
||||
public func selectPendingStarredStatusArticleIDs(completion: @escaping SyncStatusArticleIDsCompletionBlock) {
|
||||
syncStatusTable.selectPendingStarredStatusArticleIDs(completion: completion)
|
||||
}
|
||||
|
||||
|
||||
public func resetAllSelectedForProcessing(completion: DatabaseCompletionBlock? = nil) {
|
||||
syncStatusTable.resetAllSelectedForProcessing(completion: completion)
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public struct SyncDatabase {
|
||||
public func resetSelectedForProcessing(_ articleIDs: [String], completion: DatabaseCompletionBlock? = nil) {
|
||||
syncStatusTable.resetSelectedForProcessing(articleIDs, completion: completion)
|
||||
}
|
||||
|
||||
|
||||
public func deleteSelectedForProcessing(_ articleIDs: [String], completion: DatabaseCompletionBlock? = nil) {
|
||||
syncStatusTable.deleteSelectedForProcessing(articleIDs, completion: completion)
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public struct SyncDatabase {
|
||||
// MARK: - Private
|
||||
|
||||
private extension SyncDatabase {
|
||||
|
||||
|
||||
static let tableCreationStatements = """
|
||||
CREATE TABLE if not EXISTS syncStatus (articleID TEXT NOT NULL, key TEXT NOT NULL, flag BOOL NOT NULL DEFAULT 0, selected BOOL NOT NULL DEFAULT 0, PRIMARY KEY (articleID, key));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user