Skip to content

Commit

Permalink
deps: update exposed to v0.53.0
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and fviernau committed Jul 31, 2024
1 parent 58267f5 commit 3b079c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cvssCalculator = "1.4.3"
cyclonedx = "9.0.4"
diffUtils = "4.12"
diskLruCache = "2.0.2"
exposed = "0.52.0"
exposed = "0.53.0"
flexmark = "0.64.8"
freemarker = "2.3.33"
greenmail = "2.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class PackageBasedPostgresStorage(
return runCatching {
database.transaction {
ScanResultDao.find {
var expression = (ScanResults.identifier eq pkg.id.toCoordinates())
var expression = ScanResults.identifier eq pkg.id

scannerMatcher?.regScannerName?.let {
expression = expression and (rawParam("scan_result->'scanner'->>'name'") tilde it)
Expand Down
8 changes: 6 additions & 2 deletions scanner/src/main/kotlin/storages/utils/ScanResultDao.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,22 @@ import org.jetbrains.exposed.dao.IntEntity
import org.jetbrains.exposed.dao.IntEntityClass
import org.jetbrains.exposed.dao.id.EntityID
import org.jetbrains.exposed.dao.id.IntIdTable
import org.jetbrains.exposed.sql.Column

import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.ScanResult

object ScanResults : IntIdTable("scan_results") {
val identifier = text("identifier").index("identifier")
val identifier: Column<Identifier> = text("identifier")
.transform({ Identifier(it) }, { it.toCoordinates() })
.index("identifier")

val scanResult = jsonb<ScanResult>("scan_result")
}

class ScanResultDao(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<ScanResultDao>(ScanResults)

var identifier: Identifier by ScanResults.identifier.transform({ it.toCoordinates() }, { Identifier(it) })
var identifier: Identifier by ScanResults.identifier
var scanResult: ScanResult by ScanResults.scanResult
}

0 comments on commit 3b079c4

Please sign in to comment.