getRelation method

  1. @override
Relation getRelation(
  1. String relationId
)
override

Get a relation (by id)

Implementation

@override
Relation getRelation(String relationId) {
  final rows = _select(
    'relations',
    where: 'id = ?',
    whereArgs: [relationId],
  );
  if (rows.isEmpty) {
    throw StateError('Relation with id $relationId not found');
  }
  return _rowToRelation(rows.first);
}