accounts method
- int? limit,
Returns all the DtoMyUsers.
Implementation
Future<List<DtoMyUser>> accounts({int? limit}) async {
if (db == null) {
return [];
}
final stmt = db!.select(db!.myUsers);
stmt.orderBy([(u) => OrderingTerm.desc(db!.myUsers.lastSeenAt)]);
if (limit != null) {
stmt.limit(limit);
}
return (await stmt.get()).map((row) => _MyUserDb.fromDb(row)).toList();
}