Skip to content

Commit

Permalink
Update fa-db and associated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
TebaleloS committed Jul 10, 2024
1 parent dcefb8c commit c582b79
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 56 deletions.
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Dependencies {

val postgresql = "42.6.0"

val fadb = "0.3.0"
val fadb = "0.4.1"

val json4s_spark2 = "3.5.3"
val json4s_spark3 = "3.7.0-M11"
Expand Down Expand Up @@ -134,7 +134,7 @@ object Dependencies {
val zioOrg = "dev.zio"
val tapirOrg = "com.softwaremill.sttp.tapir"
val http4sOrg = "org.http4s"
val faDbOrg = "za.co.absa.fa-db"
val faDbOrg = "za.co.absa.db.fa-db"
val playOrg = "org.playframework"
val sbtOrg = "com.github.sbt"
val logbackOrg = "ch.qos.logback"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.atum.server.api.controller
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.model.ErrorResponse.{ErrorResponse, GeneralErrorResponse, InternalServerErrorResponse}
import za.co.absa.atum.server.model.SuccessResponse.{MultiSuccessResponse, SingleSuccessResponse}
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._

trait BaseController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package za.co.absa.atum.server.api.database

import doobie.Transactor
import za.co.absa.fadb.doobie.DoobieEngine
import za.co.absa.db.fadb.doobie.DoobieEngine
import zio._
import zio.interop.catz._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package za.co.absa.atum.server.api.database.flows

import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.naming.implementations.SnakeCaseNaming.Implicits._
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.naming.implementations.SnakeCaseNaming.Implicits._

object Flows extends DBSchema
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import za.co.absa.atum.model.dto.CheckpointQueryDTO
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.flows.Flows
import za.co.absa.atum.server.model.{CheckpointFromDB, PartitioningForDB}
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.DoobieEngine
import za.co.absa.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.DoobieEngine
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import zio._
import zio.interop.catz._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package za.co.absa.atum.server.api.database.runs

import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.naming.implementations.SnakeCaseNaming.Implicits._
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.naming.implementations.SnakeCaseNaming.Implicits._

object Runs extends DBSchema
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import za.co.absa.atum.model.dto.AdditionalDataSubmitDTO
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import za.co.absa.atum.server.model.PartitioningForDB
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.fadb.status.handling.implementations.StandardStatusHandling
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.db.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.db.fadb.status.handling.implementations.StandardStatusHandling
import zio._
import zio.interop.catz._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import doobie.util.Read
import play.api.libs.json.Json
import za.co.absa.atum.model.dto.PartitioningSubmitDTO
import za.co.absa.atum.server.model.PartitioningForDB
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.fadb.status.handling.implementations.StandardStatusHandling
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.db.fadb.status.handling.implementations.StandardStatusHandling
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import zio._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import za.co.absa.atum.model.dto.PartitioningDTO
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import za.co.absa.atum.server.model.PartitioningForDB
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.fadb.doobie.DoobieEngine
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.db.fadb.doobie.DoobieEngine
import zio.interop.catz.asyncInstance
import zio.{Task, URLayer, ZIO, ZLayer}
import za.co.absa.atum.server.api.database.DoobieImplicits.getMapWithOptionStringValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import za.co.absa.atum.model.dto.CheckpointQueryDTO
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import za.co.absa.atum.server.model.{CheckpointFromDB, PartitioningForDB}
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.DoobieEngine
import za.co.absa.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.DoobieEngine
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import zio._
import zio.interop.catz._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import doobie.util.Read
import play.api.libs.json.Json
import za.co.absa.atum.model.dto.{MeasureDTO, PartitioningDTO}
import za.co.absa.atum.server.model.PartitioningForDB
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.DoobieEngine
import za.co.absa.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.DoobieEngine
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieMultipleResultFunction
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import zio._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import doobie.implicits._
import doobie.util.Read
import za.co.absa.atum.model.dto.CheckpointDTO
import za.co.absa.atum.server.model.PartitioningForDB
import za.co.absa.fadb.DBSchema
import za.co.absa.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.fadb.status.handling.implementations.StandardStatusHandling
import za.co.absa.db.fadb.DBSchema
import za.co.absa.db.fadb.doobie.{DoobieEngine, StatusWithData}
import za.co.absa.db.fadb.doobie.DoobieFunction.DoobieSingleResultFunctionWithStatus
import za.co.absa.db.fadb.status.handling.implementations.StandardStatusHandling
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.atum.server.api.database.runs.Runs
import zio._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package za.co.absa.atum.server.api.repository

import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._

trait BaseRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package za.co.absa.atum.server.api.repository

import za.co.absa.atum.model.dto.CheckpointDTO
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._
import zio.macros.accessible

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.atum.server.api.repository
import za.co.absa.atum.model.dto.CheckpointDTO
import za.co.absa.atum.server.api.database.runs.functions.WriteCheckpoint
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._

class CheckpointRepositoryImpl(writeCheckpointFn: WriteCheckpoint) extends CheckpointRepository with BaseRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.atum.server.api.repository
import za.co.absa.atum.model.dto.{AdditionalDataDTO, AdditionalDataSubmitDTO, CheckpointQueryDTO, MeasureDTO, PartitioningDTO, PartitioningSubmitDTO}
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.atum.server.model.CheckpointFromDB
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio.IO
import zio.macros.accessible

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import za.co.absa.atum.server.api.database.runs.functions.{
GetPartitioningMeasures }
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.atum.server.model.CheckpointFromDB
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._
import zio.prelude.ZivariantOps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package za.co.absa.atum.server.api.service

import za.co.absa.atum.server.api.exception.{DatabaseError, ServiceError}
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._

trait BaseService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package za.co.absa.atum.server.api.service

import za.co.absa.atum.model.dto.CheckpointDTO
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._
import zio.macros.accessible

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.atum.server.api.service
import za.co.absa.atum.model.dto.CheckpointDTO
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.api.repository.CheckpointRepository
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio._

class CheckpointServiceImpl(checkpointRepository: CheckpointRepository)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package za.co.absa.atum.server.api.service

import za.co.absa.atum.model.dto.{AdditionalDataDTO, AdditionalDataSubmitDTO, CheckpointDTO, CheckpointQueryDTO, MeasureDTO, PartitioningDTO, PartitioningSubmitDTO}
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import zio.IO
import zio.macros.accessible

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.atum.server.api.service
import za.co.absa.atum.model.dto._
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.api.repository.PartitioningRepository
import za.co.absa.fadb.exceptions.StatusException
import za.co.absa.db.fadb.exceptions.StatusException
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.atum.server.model.CheckpointFromDB
import zio._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import za.co.absa.atum.server.api.TestData
import za.co.absa.atum.server.api.exception.ServiceError
import za.co.absa.atum.server.api.service.CheckpointService
import za.co.absa.atum.server.model.ErrorResponse.{GeneralErrorResponse, InternalServerErrorResponse}
import za.co.absa.fadb.exceptions.ErrorInDataException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.ErrorInDataException
import za.co.absa.db.fadb.status.FunctionStatus
import zio.test.Assertion.failsWithA
import zio._
import zio.test._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

package za.co.absa.atum.server.api.database.runs.functions

import doobie.WeakAsync.doobieWeakAsyncForAsync
import za.co.absa.atum.model.dto.{AdditionalDataSubmitDTO, PartitionDTO}
import za.co.absa.atum.server.ConfigProviderTest
import za.co.absa.atum.server.api.TestTransactorProvider
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.fadb.exceptions.DataNotFoundException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.DataNotFoundException
import za.co.absa.db.fadb.status.FunctionStatus
import zio._
import zio.test._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import za.co.absa.atum.model.dto._
import za.co.absa.atum.server.ConfigProviderTest
import za.co.absa.atum.server.api.TestTransactorProvider
import za.co.absa.atum.server.api.database.PostgresDatabaseProvider
import za.co.absa.fadb.exceptions.DataNotFoundException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.DataNotFoundException
import za.co.absa.db.fadb.status.FunctionStatus
import zio._
import zio.test._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import org.mockito.Mockito.{mock, when}
import za.co.absa.atum.server.api.database.runs.functions.WriteCheckpoint
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.atum.server.api.TestData
import za.co.absa.fadb.exceptions.ErrorInDataException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.ErrorInDataException
import za.co.absa.db.fadb.status.FunctionStatus
import zio._
import zio.test.Assertion.failsWithA
import zio.test._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import za.co.absa.atum.server.api.TestData
import za.co.absa.atum.server.api.database.runs.functions._
import za.co.absa.atum.server.api.exception.DatabaseError
import za.co.absa.atum.server.model.CheckpointFromDB
import za.co.absa.fadb.exceptions.ErrorInDataException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.ErrorInDataException
import za.co.absa.db.fadb.status.FunctionStatus
import zio._
import zio.test.Assertion.failsWithA
import zio.test._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import org.mockito.Mockito.{mock, when}
import za.co.absa.atum.server.api.TestData
import za.co.absa.atum.server.api.exception.{DatabaseError, ServiceError}
import za.co.absa.atum.server.api.repository.CheckpointRepository
import za.co.absa.fadb.exceptions.ErrorInDataException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.ErrorInDataException
import za.co.absa.db.fadb.status.FunctionStatus
import zio.test.Assertion.failsWithA
import zio.test._
import zio._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import org.mockito.Mockito.{mock, when}
import za.co.absa.atum.server.api.TestData
import za.co.absa.atum.server.api.exception.{DatabaseError, ServiceError}
import za.co.absa.atum.server.api.repository.PartitioningRepository
import za.co.absa.fadb.exceptions.ErrorInDataException
import za.co.absa.fadb.status.FunctionStatus
import za.co.absa.db.fadb.exceptions.ErrorInDataException
import za.co.absa.db.fadb.status.FunctionStatus
import zio.test.Assertion.failsWithA
import zio.test._
import zio._
Expand Down

0 comments on commit c582b79

Please sign in to comment.