@@ -335,17 +335,17 @@ insertManyDrepDistr = insertManyCheckUnique "Many DrepDistr"
335
335
-- insertReverseIndex :: (MonadBaseControl IO m, MonadIO m) => ReverseIndex -> ReaderT SqlBackend m ReverseIndexId
336
336
-- insertReverseIndex = insertUnchecked "ReverseIndex"
337
337
338
- insertCheckOffChainPoolData :: (MonadBaseControl IO m , MonadIO m ) => OffChainPoolData -> ReaderT SqlBackend m ()
339
- insertCheckOffChainPoolData pod = do
340
- foundPool <- existsPoolHashId (offChainPoolDataPoolId pod)
341
- foundMeta <- existsPoolMetadataRefId (offChainPoolDataPmrId pod)
342
- when (foundPool && foundMeta) . void $ insertCheckUnique " OffChainPoolData" pod
343
-
344
- insertCheckOffChainPoolFetchError :: (MonadBaseControl IO m , MonadIO m ) => OffChainPoolFetchError -> ReaderT SqlBackend m ()
345
- insertCheckOffChainPoolFetchError pofe = do
346
- foundPool <- existsPoolHashId (offChainPoolFetchErrorPoolId pofe)
347
- foundMeta <- existsPoolMetadataRefId (offChainPoolFetchErrorPmrId pofe)
348
- when (foundPool && foundMeta) . void $ insertCheckUnique " OffChainPoolFetchError" pofe
338
+ -- insertCheckOffChainPoolData :: (MonadBaseControl IO m, MonadIO m) => OffChainPoolData -> ReaderT SqlBackend m ()
339
+ -- insertCheckOffChainPoolData pod = do
340
+ -- foundPool <- existsPoolHashId (offChainPoolDataPoolId pod)
341
+ -- foundMeta <- existsPoolMetadataRefId (offChainPoolDataPmrId pod)
342
+ -- when (foundPool && foundMeta) . void $ insertCheckUnique "OffChainPoolData" pod
343
+
344
+ -- insertCheckOffChainPoolFetchError :: (MonadBaseControl IO m, MonadIO m) => OffChainPoolFetchError -> ReaderT SqlBackend m ()
345
+ -- insertCheckOffChainPoolFetchError pofe = do
346
+ -- foundPool <- existsPoolHashId (offChainPoolFetchErrorPoolId pofe)
347
+ -- foundMeta <- existsPoolMetadataRefId (offChainPoolFetchErrorPmrId pofe)
348
+ -- when (foundPool && foundMeta) . void $ insertCheckUnique "OffChainPoolFetchError" pofe
349
349
350
350
-- insertOffChainVoteData :: (MonadBaseControl IO m, MonadIO m) => OffChainVoteData -> ReaderT SqlBackend m (Maybe OffChainVoteDataId)
351
351
-- insertOffChainVoteData ocvd = do
@@ -384,12 +384,12 @@ insertCheckOffChainPoolFetchError pofe = do
384
384
-- insertDelistedPool :: (MonadBaseControl IO m, MonadIO m) => DelistedPool -> ReaderT SqlBackend m DelistedPoolId
385
385
-- insertDelistedPool = insertCheckUnique "DelistedPool"
386
386
387
- insertExtraMigration :: (MonadBaseControl IO m , MonadIO m ) => ExtraMigration -> ReaderT SqlBackend m ()
388
- insertExtraMigration token = void . insert $ ExtraMigrations (textShow token) (Just $ extraDescription token)
387
+ -- insertExtraMigration :: (MonadBaseControl IO m, MonadIO m) => ExtraMigration -> ReaderT SqlBackend m ()
388
+ -- insertExtraMigration token = void . insert $ ExtraMigrations (textShow token) (Just $ extraDescription token)
389
389
390
- insertEpochStakeProgress :: (MonadBaseControl IO m , MonadIO m ) => [EpochStakeProgress ] -> ReaderT SqlBackend m ()
391
- insertEpochStakeProgress =
392
- insertManyCheckUnique " Many EpochStakeProgress"
390
+ -- insertEpochStakeProgress :: (MonadBaseControl IO m, MonadIO m) => [EpochStakeProgress] -> ReaderT SqlBackend m ()
391
+ -- insertEpochStakeProgress =
392
+ -- insertManyCheckUnique "Many EpochStakeProgress"
393
393
394
394
updateSetComplete :: MonadIO m => Word64 -> ReaderT SqlBackend m ()
395
395
updateSetComplete epoch = do
@@ -606,18 +606,18 @@ insertManyWithManualUnique str contraintExists constraintName =
606
606
where
607
607
mConstraintName = if contraintExists then Just constraintName else Nothing
608
608
609
- insertManyCheckUnique ::
610
- forall m record .
611
- ( MonadBaseControl IO m
612
- , MonadIO m
613
- , OnlyOneUniqueKey record
614
- ) =>
615
- String ->
616
- [record ] ->
617
- ReaderT SqlBackend m ()
618
- insertManyCheckUnique vtype records = do
619
- let constraintName = uniqueDBName $ onlyOneUniqueDef (Proxy @ record )
620
- insertManyUnique vtype (Just constraintName) records
609
+ -- insertManyCheckUnique ::
610
+ -- forall m record.
611
+ -- ( MonadBaseControl IO m
612
+ -- , MonadIO m
613
+ -- , OnlyOneUniqueKey record
614
+ -- ) =>
615
+ -- String ->
616
+ -- [record] ->
617
+ -- ReaderT SqlBackend m ()
618
+ -- insertManyCheckUnique vtype records = do
619
+ -- let constraintName = uniqueDBName $ onlyOneUniqueDef (Proxy @record)
620
+ -- insertManyUnique vtype (Just constraintName) records
621
621
622
622
-- Insert, getting PostgreSQL to check the uniqueness constaint. If it is violated,
623
623
-- simply returns the Key, without changing anything.
0 commit comments