Skip to content

Commit

Permalink
Upgrade JOOQ lib version (#127)
Browse files Browse the repository at this point in the history
* Upgrade JOOQ lib version

* fix specs
  • Loading branch information
kgribov committed Mar 26, 2024
1 parent 9876e9a commit e05d1dd
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/CI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import java.lang.Boolean.parseBoolean
object Ci {

private const val SNAPSHOT_BASE = "0.7.0"
private const val RELEASE_VERSION = "0.6.5"
private const val RELEASE_VERSION = "0.6.6"
private val githubSha = System.getenv("GITHUB_SHA") ?: "latest"

val publishRelease = System.getProperty("release", "true").let(::parseBoolean)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object versions {
val kotlin_coroutines = "1.7.3"
val kotlin_serialization_json = "1.6.3"
val kotest = "5.8.0"
val jooq = "3.18.7"
val jooq = "3.19.6"
val flywaydb = "10.1.0"
val opentracing = "0.33.0"
val jaeger = "1.8.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ class JooqBaseRepositoryBatchingSpec : BehaviorSpec({
"record_created_at",
"version")
values
('${dep1.id().id}',
(cast('${dep1.id().id}' as uuid),
'store me in the repo',
'${boss.id}',
cast('${boss.id}' as uuid),
1,
'BUBALEH',
cast('OWNED' as "departments_state"),
Expand Down Expand Up @@ -171,18 +171,18 @@ class JooqBaseRepositoryBatchingSpec : BehaviorSpec({
"record_created_at",
"version")
values
('${dep1.id().id}',
(cast('${dep1.id().id}' as uuid),
'store me in the repo',
'${boss1.id}',
cast('${boss1.id}' as uuid),
1,
'BUBALEH',
cast('OWNED' as "departments_state"),
timestamp '$recordCreatedAt',
timestamp '$recordCreatedAt',
1),
('${dep2.id().id}',
(cast('${dep2.id().id}' as uuid),
'store me in the repo too',
'${boss2.id}',
cast('${boss2.id}' as uuid),
1,
'SHAKSHOUKA',
cast('OWNED' as "departments_state"),
Expand Down Expand Up @@ -236,13 +236,13 @@ class JooqBaseRepositoryBatchingSpec : BehaviorSpec({
update.jooqQuery.getSQL(INLINED) shouldBe """
update "departments" set
"name" = 'UPDATE TEST',
"boss" = '${boss.id}',
"boss" = cast('${boss.id}' as uuid),
"headcount" = 1,
"ration" = 'BUBALEH',
"state" = cast('OWNED' as "departments_state"),
"record_updated_at" = timestamp '$recordUpdatedAt',
"version" = 2
where ("departments"."id" = '${dep1.id().id}' and "departments"."version" = 1)
where ("departments"."id" = cast('${dep1.id().id}' as uuid) and "departments"."version" = 1)
""".trim().replace(Regex("\\s+"), " ")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class JooqBaseRepositoryExistsPositiveSpec : BehaviorSpec({
where exists
(select 1 as "one"
from "departments"
where "departments"."boss" = '${bossId.id}')
where "departments"."boss" = cast('${bossId.id}' as uuid))
""".trim().replace(Regex("\\s+"), " ")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class JooqBaseRepositoryNegativeSpec : BehaviorSpec({
"record_created_at",
"version")
values
('${dep.id().id}',
(cast('${dep.id().id}' as uuid),
'store me in the repo',
'${boss.id}',
cast('${boss.id}' as uuid),
1,
'BUBALEH',
cast('OWNED' as "departments_state"),
Expand Down Expand Up @@ -144,13 +144,13 @@ class JooqBaseRepositoryNegativeSpec : BehaviorSpec({
update.jooqQuery.getSQL(INLINED) shouldBe """
update "departments" set
"name" = 'UPDATE TEST',
"boss" = '${boss.id}',
"boss" = cast('${boss.id}' as uuid),
"headcount" = 1,
"ration" = 'BUBALEH',
"state" = cast('OWNED' as "departments_state"),
"record_updated_at" = timestamp '$recordUpdatedAt',
"version" = 2
where ("departments"."id" = '${dep.id().id}' and "departments"."version" = 1)
where ("departments"."id" = cast('${dep.id().id}' as uuid) and "departments"."version" = 1)
""".trim().replace(Regex("\\s+"), " ")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ class JooqBaseRepositoryPositiveSpec : BehaviorSpec({
"record_created_at",
"version")
values
('${dep.id().id}',
(cast('${dep.id().id}' as uuid),
'store me in the repo',
'${boss.id}',
cast('${boss.id}' as uuid),
1,
'BUBALEH',
cast('OWNED' as "departments_state"),
Expand Down Expand Up @@ -132,13 +132,13 @@ class JooqBaseRepositoryPositiveSpec : BehaviorSpec({
update.jooqQuery.getSQL(INLINED) shouldBe """
update "departments" set
"name" = 'UPDATE TEST',
"boss" = '${boss.id}',
"boss" = cast('${boss.id}' as uuid),
"headcount" = 1,
"ration" = 'BUBALEH',
"state" = cast('OWNED' as "departments_state"),
"record_updated_at" = timestamp '$recordUpdatedAt',
"version" = 2
where ("departments"."id" = '${dep.id().id}' and "departments"."version" = 1)
where ("departments"."id" = cast('${dep.id().id}' as uuid) and "departments"."version" = 1)
""".trim().replace(Regex("\\s+"), " ")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class PagingStrategySpec : BehaviorSpec({
("bubalehs"."state" = cast('SERVED' as "bubalehs_state")
and ("bubalehs"."produced_on" < timestamp '$renderedTimestamp'
or ("bubalehs"."produced_on" = timestamp '$renderedTimestamp'
and "bubalehs"."id" > 'a5e15308-3a8d-462b-b96c-6f1137e30f0d')))
and "bubalehs"."id" > cast('a5e15308-3a8d-462b-b96c-6f1137e30f0d' as uuid))))
order by "bubalehs"."produced_on" desc, "bubalehs"."id"
fetch next 1 rows only
""".trimIndent().replace(Regex("\\s+"), " ")
Expand Down

0 comments on commit e05d1dd

Please sign in to comment.