findById method
Future<T?>
findById({
- required String id,
- List<
String> ? fields, - Database? database,
- List<
ColumnRelation> ? relations,
override
Implementation
@override
Future<T?> findById(
{required String id,
List<String>? fields,
Database? database,
List<ColumnRelation>? relations}) async {
final Database db = database != null ? database : this.database;
var results = await this.find(id: id, fields: fields, database: db);
return results.length > 0 ? results[0] : null;
}