diff --git a/src/Simplex/Messaging/Agent/Store/Postgres.hs b/src/Simplex/Messaging/Agent/Store/Postgres.hs index 897c31965..ad66c7763 100644 --- a/src/Simplex/Messaging/Agent/Store/Postgres.hs +++ b/src/Simplex/Messaging/Agent/Store/Postgres.hs @@ -5,7 +5,6 @@ module Simplex.Messaging.Agent.Store.Postgres ( createDBStore, - defaultSimplexConnectInfo, closeDBStore, execSQL ) @@ -29,13 +28,6 @@ import UnliftIO.Exception (onException) import UnliftIO.MVar import UnliftIO.STM -defaultSimplexConnectInfo :: ConnectInfo -defaultSimplexConnectInfo = - defaultConnectInfo - { connectUser = "simplex", - connectDatabase = "simplex_v6_3_client_db" - } - -- | Create a new Postgres DBStore with the given connection info, schema name and migrations. -- This function creates the user and/or database passed in connectInfo if they do not exist -- (expects the default 'postgres' user and 'postgres' db to exist). diff --git a/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs b/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs index 46c0847d1..7e8406d5c 100644 --- a/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs +++ b/src/Simplex/Messaging/Agent/Store/SQLite/DB.hs @@ -16,10 +16,8 @@ module Simplex.Messaging.Agent.Store.SQLite.DB execute, execute_, executeMany, - executeNamed, query, query_, - queryNamed, ) where @@ -33,7 +31,7 @@ import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Text (Text) import Data.Time (diffUTCTime, getCurrentTime) -import Database.SQLite.Simple (FromRow, NamedParam, Query, ToRow) +import Database.SQLite.Simple (FromRow, Query, ToRow) import qualified Database.SQLite.Simple as SQL import Database.SQLite.Simple.FromField (FromField (..)) import Database.SQLite.Simple.ToField (ToField (..)) @@ -105,11 +103,6 @@ execute_ :: Connection -> Query -> IO () execute_ Connection {conn, slow} sql = timeIt slow sql $ SQL.execute_ conn sql {-# INLINE execute_ #-} --- TODO [postgres] remove -executeNamed :: Connection -> Query -> [NamedParam] -> IO () -executeNamed Connection {conn, slow} sql = timeIt slow sql . SQL.executeNamed conn sql -{-# INLINE executeNamed #-} - executeMany :: ToRow q => Connection -> Query -> [q] -> IO () executeMany Connection {conn, slow} sql = timeIt slow sql . SQL.executeMany conn sql {-# INLINE executeMany #-} @@ -122,9 +115,4 @@ query_ :: FromRow r => Connection -> Query -> IO [r] query_ Connection {conn, slow} sql = timeIt slow sql $ SQL.query_ conn sql {-# INLINE query_ #-} --- TODO [postgres] remove -queryNamed :: FromRow r => Connection -> Query -> [NamedParam] -> IO [r] -queryNamed Connection {conn, slow} sql = timeIt slow sql . SQL.queryNamed conn sql -{-# INLINE queryNamed #-} - $(J.deriveJSON defaultJSON ''SlowQueryStats) diff --git a/tests/Fixtures.hs b/tests/Fixtures.hs index a8e2542ec..54065d121 100644 --- a/tests/Fixtures.hs +++ b/tests/Fixtures.hs @@ -10,7 +10,7 @@ import Database.PostgreSQL.Simple (ConnectInfo (..), defaultConnectInfo) testDBConnectInfo :: ConnectInfo testDBConnectInfo = defaultConnectInfo { - connectUser = "test_user", + connectUser = "test_agent_user", connectDatabase = "test_agent_db" } #endif