Skip to content

Commit

Permalink
Hikari autocommit (#466)
Browse files Browse the repository at this point in the history
* added autoCommit flag to hikari config

* changed default value to false

Co-authored-by: Karel Fajkus <[email protected]>
  • Loading branch information
Peppi-Ressler and Karel Fajkus authored Feb 23, 2021
1 parent a227eb2 commit 298c689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ final case class DoobieHikariConfig(
registerMBeans: Boolean = false,
validationTimeout: Option[FiniteDuration] = None,
transactionIsolation: Option[TransactionIsolation] = None,
dataSourceProperties: Map[String, String] = Map.empty
dataSourceProperties: Map[String, String] = Map.empty,
autoCommit: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ object DoobieHikariModule {
c.setAllowPoolSuspension(config.allowPoolSuspension)
c.setIsolateInternalQueries(config.isolateInternalQueries)
c.setRegisterMbeans(config.registerMBeans)
c.setAutoCommit(config.autoCommit)
val dataSourceProperties = new Properties()
config.dataSourceProperties.foreach { case (k, v) => dataSourceProperties.put(k, v) }
c.setDataSourceProperties(dataSourceProperties)
Expand Down

0 comments on commit 298c689

Please sign in to comment.