MCPcopy Index your code
hub / github.com/chinesehuazhou/python-weekly / query_data

Function query_data

resources/weekly_kanban.py:33–48  ·  view source on GitHub ↗

从数据库查询周刊内容统计数据 Returns: list: 包含期号和各类内容数量的元组列表

()

Source from the content-addressed store, hash-verified

31}
32
33def query_data():
34 """
35 从数据库查询周刊内容统计数据
36
37 Returns:
38 list: 包含期号和各类内容数量的元组列表
39 """
40 with sqlite3.connect(db_path) as conn:
41 cursor = conn.cursor()
42 query = """
43 SELECT issue_no, article_count, project_count, audio_video_count, hot_topic_count, book_count
44 FROM weekly_summary
45 """
46 cursor.execute(query)
47 data = cursor.fetchall()
48 return data
49
50def prepare_data(data, start, end):
51 """

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected