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
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user