Skip to content
Snippets Groups Projects
Commit a9d6a4ef authored by Kai Oliver Meister's avatar Kai Oliver Meister :cow2:
Browse files

fixing the student-queries ORDER BY statements

parent 3daf000d
No related branches found
No related tags found
No related merge requests found
Pipeline #589843 passed
......@@ -34,9 +34,12 @@ export const getAllStudents = async () => {
FROM ->submission
ORDER BY assignment
) AS submissions
FROM student
PARALLEL;
FROM student;
`);
// "ORDER BY assignment" statement for submission-selection causes surreal to panic,
// but would be good for consistency
//
// alternatively: PARALLEL and ORDER BY clash somehow
if (student_array === undefined) {
console.log(`no students available on DB !`)
return undefined
......@@ -77,9 +80,10 @@ export const getStudentByID = async (student_id: string) => {
ORDER BY assignment
) AS submissions
FROM student
WHERE record::id(id) == "${student_id}"
PARALLEL;
WHERE record::id(id) == "${student_id}";
`);
// "ORDER BY assignment" statement for submission-selection causes surreal to panic,
// but would be good for consistency
if (student_array === undefined) {
console.log(`no student available for ID ${student_id} !`)
return undefined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment