fetchAll(_:keys:)
Returns an array of records identified by the provided unique keys (primary key or any key with a unique index on it).
static func fetchAll(_ db: Database, keys: [[String : (any DatabaseValueConvertible)?]]) 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, keys: [
["email": "a@example.com"],
["email": "b@example.com"]])
}
The order in which the records are returned is undefined (ref).