Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Feb 27, 2024
1 parent a5c51ef commit 8300fc2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.JoinType
import org.jetbrains.exposed.sql.Op
import org.jetbrains.exposed.sql.SqlExpressionBuilder.plus
import org.jetbrains.exposed.sql.SortOrder
import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.andWhere
import org.jetbrains.exposed.sql.booleanParam
Expand All @@ -24,6 +25,7 @@ import org.jetbrains.exposed.sql.not
import org.jetbrains.exposed.sql.select
import org.jetbrains.exposed.sql.stringParam
import org.jetbrains.exposed.sql.update

import org.loculus.backend.api.AccessionVersion
import org.loculus.backend.api.AccessionVersionInterface
import org.loculus.backend.api.ApproveDataScope
Expand Down Expand Up @@ -91,7 +93,7 @@ class SubmissionDatabaseService(
.select(
where = { table.statusIs(RECEIVED) and table.isMaxVersion and table.organismIs(organism) },
)
.orderBy(table.submittedAtColumn, table.accessionColumn)
.orderBy(table.submittedAtColumn to SortOrder.ASC, table.accessionColumn to SortOrder.ASC)
.limit(numberOfSequenceEntries)
.map {
UnprocessedData(
Expand Down Expand Up @@ -455,7 +457,7 @@ class SubmissionDatabaseService(
table.groupIsOneOf(validatedGroupNames)
},
)
.orderBy(table.submittedAtColumn, table.accessionColumn)
.orderBy(table.submittedAtColumn to SortOrder.ASC, table.accessionColumn to SortOrder.ASC)

if (organism != null) {
query.andWhere { table.organismIs(organism) }
Expand Down

0 comments on commit 8300fc2

Please sign in to comment.