Get searchRowID by column index 0, since it’s a single-column query. This should make searching imperceptibly faster.

This commit is contained in:
Brent Simmons 2019-03-03 12:02:26 -08:00
parent 96ab26f82e
commit a9751d5a51
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ private extension ArticlesTable {
guard let resultSet = database.executeQuery(sql, withArgumentsIn: searchStringParameters) else {
return Set<Article>()
}
let searchRowIDs = resultSet.mapToSet { $0.longLongInt(forColumn: DatabaseKey.rowID) }
let searchRowIDs = resultSet.mapToSet { $0.longLongInt(forColumnIndex: 0) }
if searchRowIDs.isEmpty {
return Set<Article>()
}