codedang icon indicating copy to clipboard operation
codedang copied to clipboard

feat(be): add client get submission order option

Open mnseok opened this issue 1 year ago • 2 comments
trafficstars

Description

제출 목록 불러오는 순서를 정할 수 있도록 option을 부여했습니다.

option 종류: id-asc, id-desc memory-asc, memory-desc cpuTime-asc, cpuTime-desc date-asc, date-desc

만약 제출 결과가 Accepted가 아닌 경우에는 maxCpuTime과 maxMemoryUsage를 0으로 설정합니다.

Additional context

현재는 submission result에 의존하기 때문에 DB에서 데이터를 불러온 후 최댓값을 찾고 이를 통해 정렬합니다. DBMS상에서 정렬 된 개선 방법이 있다면 알려주세요.

  • raw query를 사용하면 가능한데 ORM 쓰는 의미가 없어질 것 같아서 배제했습니다

Before submitting the PR, please make sure you do the following

  • [x] Read the Contributing Guidelines
  • [x] Read the Contributing Guidelines and follow the Commit Convention
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [x] Ideally, include relevant tests that fail without this PR but pass with it.

mnseok avatar May 13 '24 03:05 mnseok

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codedang ❌ Failed (Inspect) Jul 4, 2024 10:06am

vercel[bot] avatar May 13 '24 03:05 vercel[bot]