neighbors method

List<String> neighbors(
  1. String table
)

Return all tables directly connected to table via an edge.

Implementation

List<String> neighbors(String table) {
  final result = <String>[];
  for (final e in edges) {
    if (e.leftTable == table) result.add(e.rightTable);
    if (e.rightTable == table) result.add(e.leftTable);
  }
  return result;
}