Skip to content

Commit 1b19c1f

Browse files
committed
add HasDbInfo class and instances
1 parent b27b300 commit 1b19c1f

34 files changed

+3103
-3547
lines changed

cardano-db-sync/src/Cardano/DbSync.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ runDbSync metricsSetters knownMigrations iomgr trce params syncNodeConfigFromFil
115115

116116
let setting = Db.toConnectionSetting pgConfig
117117

118+
118119
-- For testing and debugging.
119120
whenJust (enpMaybeRollback params) $ \slotNo ->
120121
void $ unsafeRollback trce (txOutConfigToTableType txOutConfig) pgConfig slotNo

cardano-db-sync/src/Cardano/DbSync/OffChain.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ insertOffChainVoteResults trce resultQueue = do
148148
void $ DB.insertOffChainVoteGovActionData ocvga
149149
whenJust (offChainVoteDrep accessors ocvdId) $ \ocvdr ->
150150
void $ DB.insertOffChainVoteDrepData ocvdr
151-
DB.insertOffChainVoteAuthors $ offChainVoteAuthors accessors ocvdId
152-
DB.insertOffChainVoteReference $ offChainVoteReferences accessors ocvdId
151+
DB.insertManyOffChainVoteAuthors $ offChainVoteAuthors accessors ocvdId
152+
DB.insertManyOffChainVoteReference $ offChainVoteReferences accessors ocvdId
153153
DB.insertOffChainVoteExternalUpdate $ offChainVoteExternalUpdates accessors ocvdId
154154
OffChainVoteResultError fe -> void $ DB.insertOffChainVoteFetchError fe
155155

cardano-db/cardano-db.cabal

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,17 @@ library
6565
Cardano.Db.Schema.Orphans
6666
Cardano.Db.Schema.Types
6767
Cardano.Db.Statement
68+
Cardano.Db.Statement.Function.Core
69+
Cardano.Db.Statement.Function.Query
70+
Cardano.Db.Statement.Function.Insert
6871
Cardano.Db.Statement.Base
6972
Cardano.Db.Statement.EpochAndProtocol
7073
Cardano.Db.Statement.GovernanceAndVoting
71-
Cardano.Db.Statement.Helpers
7274
Cardano.Db.Statement.MultiAsset
7375
Cardano.Db.Statement.OffChain
7476
Cardano.Db.Statement.Pool
7577
Cardano.Db.Statement.StakeDeligation
78+
Cardano.Db.Statement.Types
7679
Cardano.Db.Types
7780

7881
build-depends: aeson

0 commit comments

Comments
 (0)