From 08f0ffbcf252fd494c77907f555290e040641804 Mon Sep 17 00:00:00 2001 From: Marcelo Lazaroni Date: Thu, 9 Jan 2025 15:52:21 +0000 Subject: [PATCH] Use ambar-sqlserver lib --- cabal.project | 11 +++++++++-- emulator.cabal | 3 ++- src/Ambar/Emulator/Connector/MicrosoftSQLServer.hs | 4 ++-- src/Database/MicrosoftSQLServer.hs | 2 +- tests/Test/Connector/MicrosoftSQLServer.hs | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cabal.project b/cabal.project index bc34879..d23043d 100644 --- a/cabal.project +++ b/cabal.project @@ -3,5 +3,12 @@ packages: . source-repository-package type: git - location: https://github.com/ambarltd/ambar-hs-utils - tag: 55334ab4af375ac19f4bbbd1a20071998f9b2306 + location: https://github.com/ambarltd/haskell-libs + subdir: ambar-hs-utils + tag: 175aae291acd4996aa9b2bae3120ccf9cd32fef3 + +source-repository-package + type: git + location: https://github.com/ambarltd/haskell-libs + subdir: ambar-sqlserver + tag: 175aae291acd4996aa9b2bae3120ccf9cd32fef3 diff --git a/emulator.cabal b/emulator.cabal index d5da7cf..5c43382 100644 --- a/emulator.cabal +++ b/emulator.cabal @@ -60,10 +60,10 @@ library emulator-lib Ambar.Transport.Http Ambar.Transport.File Database.MySQL - Database.MicrosoftSQLServer build-depends: base , ambar-hs-utils + , ambar-sqlserver , aeson , aeson-pretty , async @@ -123,6 +123,7 @@ test-suite emulator-tests build-depends: base , ambar-hs-utils + , ambar-sqlserver , emulator-lib , aeson , async diff --git a/src/Ambar/Emulator/Connector/MicrosoftSQLServer.hs b/src/Ambar/Emulator/Connector/MicrosoftSQLServer.hs index ce55df1..4439aa6 100644 --- a/src/Ambar/Emulator/Connector/MicrosoftSQLServer.hs +++ b/src/Ambar/Emulator/Connector/MicrosoftSQLServer.hs @@ -26,7 +26,7 @@ import GHC.Generics (Generic) import qualified Prettyprinter as Pretty import Prettyprinter (pretty, (<+>)) -import Database.MicrosoftSQLServer +import Database.SQLServer ( Connection , ConnectionInfo(..) , withConnection @@ -38,7 +38,7 @@ import Database.MicrosoftSQLServer , rawBytes ) import qualified Database.Tds.Message as Tds -import qualified Database.MicrosoftSQLServer as M +import qualified Database.SQLServer as M import qualified Ambar.Emulator.Connector as C import Ambar.Emulator.Connector.Poll (BoundaryTracker, Boundaries(..), EntryId(..)) diff --git a/src/Database/MicrosoftSQLServer.hs b/src/Database/MicrosoftSQLServer.hs index 9c4ec04..ddc7a00 100644 --- a/src/Database/MicrosoftSQLServer.hs +++ b/src/Database/MicrosoftSQLServer.hs @@ -1,6 +1,6 @@ {-# LANGUAGE UndecidableInstances #-} -module Database.MicrosoftSQLServer +module Database.SQLServer ( Connection , ConnectionInfo(..) , withConnection diff --git a/tests/Test/Connector/MicrosoftSQLServer.hs b/tests/Test/Connector/MicrosoftSQLServer.hs index 352eed7..62e72ff 100644 --- a/tests/Test/Connector/MicrosoftSQLServer.hs +++ b/tests/Test/Connector/MicrosoftSQLServer.hs @@ -24,7 +24,7 @@ import qualified Ambar.Emulator.Queue.Topic as Topic import Ambar.Emulator.Queue.Topic (Topic, PartitionCount(..)) import Ambar.Emulator.Connector.MicrosoftSQLServer (SQLServer(..)) import Ambar.Record (Bytes(..)) -import Database.MicrosoftSQLServer as S +import Database.SQLServer as S import Util.Docker (DockerCommand(..), withDocker) import Util.OnDemand (OnDemand)