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

Function get_profile_history

skills/storage-helper/scripts/db_ops.py:700–712  ·  view source on GitHub ↗

Get profile history for the past N days

(user_id: str, days: int = 7)

Source from the content-addressed store, hash-verified

698 # the string comparisons elsewhere in this module stay valid.
699 datetime.now().isoformat(sep=" ")
700 ))
701 conn.commit()
702 paper_id = cursor.lastrowid
703 return paper_id
704 except sqlite3.IntegrityError:
705 # 数据库里可能已有同一论文,回退到查找现有记录。
706 lookup_sql = None
707 lookup_value = None
708 if normalized_arxiv_id:
709 lookup_sql = "SELECT id FROM papers WHERE arxiv_id = ?"
710 lookup_value = normalized_arxiv_id
711 elif normalized_doi:
712 lookup_sql = "SELECT id FROM papers WHERE doi = ?"
713 lookup_value = normalized_doi
714 elif normalized_title:
715 lookup_sql = "SELECT id FROM papers WHERE title = ?"

Callers

nothing calls this directly

Calls 6

cursorMethod · 0.80
nowMethod · 0.80
get_connectionFunction · 0.70
executeMethod · 0.45
fetchallMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected