Skip to content

Commit

Permalink
reduce SHOW TRANSACTION ISOLATION LEVEL at transaction start in Pos…
Browse files Browse the repository at this point in the history
…tgres (#1478) / minor code cleanup
  • Loading branch information
Tapac committed Apr 10, 2022
1 parent 0e23425 commit c0915ad
Showing 1 changed file with 5 additions and 8 deletions.
Expand Up @@ -42,15 +42,12 @@ class JdbcConnectionImpl(override val connection: Connection) : ExposedConnectio

override var transactionIsolation: Int = -1
get() {
if (field != -1) {
return field
}

return synchronized(this) {
val value = connection.transactionIsolation
field = value
value
if (field == -1) {
synchronized(this) {
field = connection.transactionIsolation
}
}
return field
}
set(value) {
if (field != value) {
Expand Down

0 comments on commit c0915ad

Please sign in to comment.