List source paths that start with *prefix*. Uses a range scan on the ``manpages`` primary key index.
(self, prefix: str)
| 648 | return [row["section"] for row in rows] |
| 649 | |
| 650 | def list_manpages(self, prefix: str) -> list[str]: |
| 651 | """List source paths that start with *prefix*. |
| 652 | |
| 653 | Uses a range scan on the ``manpages`` primary key index. |
| 654 | """ |
| 655 | rows = self._conn.execute( |
| 656 | "SELECT source FROM manpages WHERE source >= ? AND source < ?", |
| 657 | (prefix, prefix[:-1] + chr(ord(prefix[-1]) + 1)), |
| 658 | ).fetchall() |
| 659 | return [row["source"] for row in rows] |
| 660 | |
| 661 | def get_raw_manpage(self, source: str) -> RawManpage | None: |
| 662 | """Fetch and decompress a raw manpage. |
no outgoing calls