All Downloads are FREE. Search and download functionalities are using the official Maven repository.

a8.shared.jdbcf.DatabaseConfig.scala Maven / Gradle / Ivy

There is a newer version: 1.0.0-20230212_1012_master
Show newest version
package a8.shared.jdbcf

import a8.shared.jdbcf.DatabaseConfig.{DatabaseId, Password}
import a8.shared.{CompanionGen, SecretValue, StringValue}
import a8.shared.jdbcf.MxDatabaseConfig.MxDatabaseConfig
import org.typelevel.ci.CIString
import sttp.model.Uri


object DatabaseConfig extends MxDatabaseConfig {
  object DatabaseId extends StringValue.CIStringValueCompanion[DatabaseId]
  case class DatabaseId(value: CIString) extends StringValue.CIStringValue

  object Password extends SecretValue.Companion[Password]
  case class Password(value: String) extends SecretValue
}

@CompanionGen
case class DatabaseConfig(
  id: DatabaseId,
  url: Uri,
  user: String,
  password: Password,
  minIdle: Int = 1,
  maxPoolSize: Int = 50,
  autoCommit: Boolean = true,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy