Skip to content

Commit

Permalink
chore: implement getCurrentProcesses method
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomoaccursi committed Apr 5, 2023
1 parent 71dc912 commit fb7e5c9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/kotlin/infrastructure/database/DatabaseManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.litote.kmongo.findOne
import org.litote.kmongo.getCollection
import org.litote.kmongo.gt
import org.litote.kmongo.lte
import org.litote.kmongo.ne
import org.litote.kmongo.updateOne
import java.time.Instant

Expand Down Expand Up @@ -138,9 +139,10 @@ class DatabaseManager(
override fun getSurgicalProcessById(processId: ProcessData.ProcessId): SurgicalProcess? =
this.surgicalProcessCollection.findOne(SurgicalProcess::id eq processId)

override fun getCurrentSurgicalProcesses(): Set<SurgicalProcess> {
TODO("Not yet implemented")
}
override fun getCurrentSurgicalProcesses(): Set<SurgicalProcess> =
this.surgicalProcessCollection.find(
SurgicalProcess::state ne ProcessData.ProcessState.TERMINATED
).toSet()

override fun updateSurgicalProcessState(
processId: ProcessData.ProcessId,
Expand Down

0 comments on commit fb7e5c9

Please sign in to comment.