fetchAll(_:ids:)
Returns an array of records identified by their primary keys.
static func fetchAll(_ db: Database, ids: some Collection<ID>) throws -> [Self]
Parameters
Returns
An array of records.
Throws
A DatabaseError
whenever an SQLite error occurs.
For example:
try dbQueue.read { db in
let players = try Player.fetchAll(db, ids: [1, 2, 3])
let players = try Country.fetchAll(db, ids: ["FR", "US"])
}
The order in which the records are returned is undefined (ref).