Continue post-DatabaseResult simplification.

This commit is contained in:
Brent Simmons committed 2026-06-10 17:24:00 -07:00
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) {