We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
重複を防ぎたいので
The text was updated successfully, but these errors were encountered:
テストケースって異なる問題に紐づくものも全部同一のテーブルに保持されるよね 👀 異なる問題に紐づく2つのテストケースが等しくなる可能性があるから、そこら辺を unique 制約で対応できるかな??
あと、入力テストケースが1つ 5MB を超えることもあり得て、内容の一致比較に時間がかかりそう!!!
Sorry, something went wrong.
↑ これ、unique (problem_id, content) みたいに制約つければいいだけだった (うっうっう)
unique (problem_id, content)
入力ケースがデカくなることはそんなにないだろうし、良いと思う! このジャッジサイトの主な用途が中高生向け(簡単な問題がメイン)の場合は特に
DB に保存するのはテストケースの名前と紐づく問題 id だけで、content は保存されないからデータサイズについては心配しなくてもよさそうかな?content は Cloud Storage に保存されてる https://github.com/szpp-dev-team/szpp-judge-backend/blob/main/migrations/2022-10-08-050646_testcases/up.sql#L1
earlgray283
No branches or pull requests
重複を防ぎたいので
The text was updated successfully, but these errors were encountered: