Closed stuartbreckenridge closed 1 week ago
Crashing when creating placeholders. There's an underlying NSParameterAssert(numberOfValues > 0); in the rs_SQLValueListWithPlaceholders call.
placeholders
NSParameterAssert(numberOfValues > 0);
rs_SQLValueListWithPlaceholders
func unreadCount(feedIDs: Set<String>, since: Date, database: FMDatabase) -> Int? { let placeholders = NSString.rs_SQLValueList(withPlaceholders: UInt(feedIDs.count))! // <-- Thread 2: "Invalid parameter not satisfying: numberOfValues > 0" let sql = "select count(*) from articles natural join statuses where feedID in \(placeholders) and (datePublished > ? or (datePublished is null and dateArrived > ?)) and read=0;" var parameters = [Any]() parameters += Array(feedIDs) as [Any] parameters += [since] as [Any] parameters += [since] as [Any] let unreadCount = database.count(sql: sql, parameters: parameters, tableName: name) return unreadCount }
Crashing when creating
placeholders
. There's an underlyingNSParameterAssert(numberOfValues > 0);
in thers_SQLValueListWithPlaceholders
call.