Delete a manpage and its mappings (via CASCADE) from the store. Deleting from manpages cascades to parsed_manpages, which in turn cascades to mappings. Returns True if a row was deleted, False if the source was not found.
(self, source: str)
| 261 | return row is not None |
| 262 | |
| 263 | def delete_manpage(self, source: str) -> bool: |
| 264 | """Delete a manpage and its mappings (via CASCADE) from the store. |
| 265 | |
| 266 | Deleting from manpages cascades to parsed_manpages, which in turn |
| 267 | cascades to mappings. |
| 268 | |
| 269 | Returns True if a row was deleted, False if the source was not found. |
| 270 | """ |
| 271 | cur = self._conn.execute("DELETE FROM manpages WHERE source = ?", (source,)) |
| 272 | if cur.rowcount: |
| 273 | self._conn.commit() |
| 274 | return True |
| 275 | return False |
| 276 | |
| 277 | def known_sha256s(self) -> dict[str, str]: |
| 278 | """Return a mapping of source_gz_sha256 → source for all stored manpages. |