Get searchRowID by column index 0, since it’s a single-column query. This should make searching imperceptibly faster.
This commit is contained in:
parent
96ab26f82e
commit
a9751d5a51
|
@ -507,7 +507,7 @@ private extension ArticlesTable {
|
||||||
guard let resultSet = database.executeQuery(sql, withArgumentsIn: searchStringParameters) else {
|
guard let resultSet = database.executeQuery(sql, withArgumentsIn: searchStringParameters) else {
|
||||||
return Set<Article>()
|
return Set<Article>()
|
||||||
}
|
}
|
||||||
let searchRowIDs = resultSet.mapToSet { $0.longLongInt(forColumn: DatabaseKey.rowID) }
|
let searchRowIDs = resultSet.mapToSet { $0.longLongInt(forColumnIndex: 0) }
|
||||||
if searchRowIDs.isEmpty {
|
if searchRowIDs.isEmpty {
|
||||||
return Set<Article>()
|
return Set<Article>()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue