Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update database format #216

Open
KingSupernova31 opened this issue Jan 22, 2025 · 0 comments
Open

Update database format #216

KingSupernova31 opened this issue Jan 22, 2025 · 0 comments

Comments

@KingSupernova31
Copy link
Owner

The current question database uses a JSON object to represent an entire question, then puts that object in a single cell of an SQL database. This is stupid.

We also have a separate "database" in memory for pregenerated templates, which then gets saved to disk for faster startup. This feels redundant with the underlying database.

What I think we should have is a single database that stores the question data, and client requests pull directly from that database. Then we have a separate file that stores pregenerated templates (recalculated whenever the card files change), and when a question is generated, it finds the pregenerated list that matches its template and uses that while generating the question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant