0a9588abb7
- 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
27 lines
577 B
Python
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()
|