MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / paper_exists

Function paper_exists

scripts/collect_papers_by_date.py:51–54  ·  view source on GitHub ↗

检查论文是否已存在

(conn: sqlite3.Connection, arxiv_id: str)

Source from the content-addressed store, hash-verified

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

Callers 1

collect_papersFunction · 0.70

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected