检查论文是否已存在
(conn: sqlite3.Connection, arxiv_id: str)
| 49 | |
| 50 | |
| 51 | def paper_exists(conn: sqlite3.Connection, arxiv_id: str) -> bool: |
| 52 | """检查论文是否已存在""" |
| 53 | cursor = conn.execute("SELECT 1 FROM papers WHERE arxiv_id = ?", (arxiv_id,)) |
| 54 | return cursor.fetchone() is not None |
| 55 | |
| 56 | |
| 57 | def save_paper(conn: sqlite3.Connection, paper: Dict) -> None: |
no test coverage detected