Return (distro, release) pairs that have a manpage matching *name*.
(self, name: str)
| 412 | return [(row["distro"], row["release"]) for row in rows] |
| 413 | |
| 414 | def distros_for_name(self, name: str) -> list[tuple[str, str]]: |
| 415 | """Return (distro, release) pairs that have a manpage matching *name*.""" |
| 416 | rows = self._conn.execute( |
| 417 | """ |
| 418 | SELECT DISTINCT |
| 419 | SUBSTR(pm.source, 1, INSTR(pm.source, '/') - 1) as distro, |
| 420 | SUBSTR(pm.source, INSTR(pm.source, '/') + 1, |
| 421 | INSTR(SUBSTR(pm.source, INSTR(pm.source, '/') + 1), '/') - 1) as release |
| 422 | FROM mappings m |
| 423 | JOIN parsed_manpages pm ON pm.source = m.dst |
| 424 | WHERE m.src = ? |
| 425 | """, |
| 426 | (name,), |
| 427 | ).fetchall() |
| 428 | return [(row["distro"], row["release"]) for row in rows] |
| 429 | |
| 430 | def add_mapping(self, src: str, dst: str, score: int) -> None: |
| 431 | self._conn.execute( |
no outgoing calls
no test coverage detected