Files
aurak/server/test_db.py
T
Developer 0a9588abb7 feat: implement QuestionBank CRUD with pagination and template query
- Add pagination support to findAll (page, limit query params)
- Add findByTemplateId method to service
- Add GET /by-template/:templateId endpoint to controller
- Service already includes CRUD for QuestionBank and QuestionBankItem
2026-04-23 17:19:11 +08:00

27 lines
577 B
Python

import sqlite3
import os
db_path = 'd:/workspace/AuraK/server/database.sqlite'
if not os.path.exists(db_path):
print("DB not found")
exit(1)
conn = sqlite3.connect(db_path)
c = conn.cursor()
print("--- knowledge_group ---")
try:
for row in c.execute('SELECT id, name, tenantId from knowledge_group'):
print(row)
except Exception as e:
print(e)
print("\n--- import_task ---")
try:
for row in c.execute('SELECT id, targetGroupId, targetGroupName, status from import_task'):
print(row)
except Exception as e:
print(e)
conn.close()