mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 01:10:38 +00:00
Continue post-DatabaseResult simplification.
This commit is contained in:
1 parent
281025d8b4
commit
f41bf88e9b
2 files changed
+7
-7
No files matched your search
@@ -452,8 +452,8 @@ final class ArticlesTable: DatabaseTable, Sendable {
|
||||
statusesTable.fetchArticleIDsAsync(.starred, true, completion)
|
||||
}
|
||||
|
||||
func fetchStarredArticleIDs() throws -> Set<String> {
|
||||
return try statusesTable.fetchStarredArticleIDs()
|
||||
func fetchStarredArticleIDs() -> Set<String> {
|
||||
statusesTable.fetchStarredArticleIDs()
|
||||
}
|
||||
|
||||
func fetchArticleIDsForStatusesWithoutArticlesNewerThanCutoffDate(_ completion: @escaping ArticleIDsCompletionBlock) {
|
||||
|
||||
@@ -95,12 +95,12 @@ final class StatusesTable: DatabaseTable, Sendable {
|
||||
|
||||
// MARK: - Fetching
|
||||
|
||||
func fetchUnreadArticleIDs() throws -> Set<String> {
|
||||
return try fetchArticleIDs("select articleID from statuses where read=0;")
|
||||
func fetchUnreadArticleIDs() -> Set<String> {
|
||||
fetchArticleIDs("select articleID from statuses where read=0;")
|
||||
}
|
||||
|
||||
func fetchStarredArticleIDs() throws -> Set<String> {
|
||||
return try fetchArticleIDs("select articleID from statuses where starred=1;")
|
||||
func fetchStarredArticleIDs() -> Set<String> {
|
||||
fetchArticleIDs("select articleID from statuses where starred=1;")
|
||||
}
|
||||
|
||||
func fetchArticleIDsAsync(_ statusKey: ArticleStatus.Key, _ value: Bool, _ completion: @escaping ArticleIDsCompletionBlock) {
|
||||
@@ -139,7 +139,7 @@ final class StatusesTable: DatabaseTable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
func fetchArticleIDs(_ sql: String) throws -> Set<String> {
|
||||
func fetchArticleIDs(_ sql: String) -> Set<String> {
|
||||
nonisolated(unsafe) var articleIDs = Set<String>()
|
||||
queue.runInDatabaseSync { database in
|
||||
if let resultSet = database.executeQuery(sql, withArgumentsIn: nil) {
|
||||
|
||||
Reference in new issue
Block a user